Skip to content

Commit f45b501

Browse files
committed
config
1 parent 6d427c3 commit f45b501

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

js_basics/num_and_math.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// const score = 400;
2+
3+
// const balance = new Number(100.987);
4+
// console.log(score);
5+
// console.log(balance);
6+
7+
// console.log(balance.toString().length);
8+
9+
// console.log(balance.toFixed(1));
10+
// console.log(balance.toPrecision(3));
11+
12+
13+
// const hundreds = 10000000;
14+
// console.log(hundreds.toLocaleString('en-IN'));
15+
16+
17+
18+
//############################## MATHS
19+
20+
// console.log(Math);
21+
// console.log(Math.abs(-5));
22+
// console.log(Math.round(5.5));
23+
// console.log(Math.ceil(5.4)); //top
24+
// console.log(Math.round(5.1)); //bottom
25+
26+
console.log(Math.min(4,8,9,2));
27+
console.log(Math.max(4,8,9,2));
28+
29+
console.log(Math.random()); //its give u the value of b/w 0 to 1
30+
console.log((Math.random()*10)+1);
31+
console.log(Math.floor((Math.random()*10)+1));
32+
33+
const min = 10;
34+
const max = 20;
35+
console.log(Math.floor(Math.random()*(min-max+1))+min);

0 commit comments

Comments
 (0)