-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmath.js
More file actions
49 lines (38 loc) · 956 Bytes
/
math.js
File metadata and controls
49 lines (38 loc) · 956 Bytes
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
43
44
45
46
47
48
49
// math = math is a built in object that provides
// collection of properties and method.
// console.log(Math.PI);
// console.log(Math.E);
// let x = 3.21;
// let y = 2;
// let z;
// z = Math.round(x);
// console.log(z);
// let pi = Math.PI;
// let radius = 20;
// let circumference = 2 * pi * radius;
// console.log(circumference);
/* JavaScript Rounding Functions*/
// The Math.abs() Method
// The Math.ceil() Method
// The Math.floor() Method
// The Math.round() Method
// The Math.fround() Method
// The Math.trunc() Method
let x= -3;
let y = 2;
let z =32;
// let y = Math.round(x);
// let z = Math.floor(x);
// let z = Math.ceil(x);
// let z = Math.trunc(x);
// let z = Math.pow(x,y);
// let z = Math.sqrt(x);
// let z = Math.log(x);
// let z = Math.sin(x);
// let z = Math.cos(x);
// let z = Math.tan(x);
// let z = Math.abs(x);
// let z = Math.sign(x);
// let max = Math.max(x,y,z);
// let min = Math.min(x,y,z);
console.log(min);