1console.log(Math.floor(5.95));
2// expected output: 5
3
4console.log(Math.floor(5.05));
5// expected output: 5
6
7console.log(Math.floor(5));
8// expected output: 5
9
10console.log(Math.floor(-5.05));
11// expected output: -6
1// positive
2console.log(Math.floor(7.25)); // 7
3console.log(Math.floor(0.99)); // 0
4
5// negative
6console.log(Math.floor(-2.1)); // -3
7console.log(Math.floor(-9.5)); // -10
8
9// objects, strings, functions
10console.log(Math.floor("hello")); // NaN
11console.log(Math.floor({name: 'John', age: '25'})); // NaN
12console.log(Math.floor(console.log)); // NaN