-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path07_numsMaths.js
More file actions
42 lines (28 loc) · 1.06 KB
/
07_numsMaths.js
File metadata and controls
42 lines (28 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// const score = 450
// console.log(score)
// const balance = new Number(450)
// console.log(balance)
// //built in function in numbers
// //converts into string and handy to use string functions
// console.log(balance.toString().length)
// //display the decimals comes after the number
// console.log(balance.toFixed(2))
// // Precise the value to the closest
// const ohterNum = 23.4543
// console.log(ohterNum.toPrecision(3));
// //visualizing zeroes after one through indian count system
// const hund = 10000000
// console.log(hund.toLocaleString('en-IN'));
// ++++++++++++++Maths++++++++++++++
// console.log(Math.abs(-4));
// console.log(Math.round(4.3));
// console.log(Math.ceil(4.2));
// console.log(Math.floor(4.9));
// console.log(Math.max(4,2,9,11,32));
// console.log(Math.min(4,2,9,11,32));
// console.log(Math.random());
// always gives the random output between 0 to 1
// console.log(Math.floor(Math.random()*10) + 1);
const min = 10
const max = 20
console.log(Math.floor(Math.random() * (max - min + 1)) + min);