8000 math · last-endcode/JavaScript-Basics@83be115 · GitHub
[go: up one dir, main page]

Skip to content

Commit 83be115

Browse files
committed
math
1 parent 06ad334 commit 83be115

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

40_math.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// math
2+
3+
// const result = Math.PI;
4+
// console.log(result); //3.14
5+
6+
// const result = Math.random() * 10;
7+
// console.log(result); //here he will random values
8+
9+
// const result = Math.floor(4.555555555);
10+
// console.log(result); // result 4
11+
12+
// const result = Math.ceil(4.5555);
13+
// console.log(result); //result 5
14+
15+
// const result = Math.ceil(Math.random() * 10);
16+
// console.log(result); //here ceil never 0, if u have floor please add + 1
17+
18+
// min max
19+
const result = Math.max(1, 8, 0, 9);
20+
console.log(result);

0 commit comments

Comments
 (0)
0