1using Math.floor
2
3console.log(Math.floor(5.95));
4// expected output: 5
5
6console.log(Math.floor(5.05));
7// expected output: 5
8
9console.log(Math.floor(5));
10// expected output: 5
11
12console.log(Math.floor(-5.05));
13// expected output: -6
14