math.floor in js code example
Example 1: math.floor js
console.log(Math.floor(5.95));
console.log(Math.floor(5.05));
console.log(Math.floor(5));
console.log(Math.floor(-5.05));
Example 2: array.unshift in javascript
const array1 = [1, 2, 3];
console.log(array1.unshift(4, 5));
console.log(array1);
Example 3: math.round in javascript
let xo =7.45;
xo = Math.round(xo);
Example 4: javascript floor
Math.floor(1.6);
result: 1
Example 5: math.floor
console.log(Math.floor(5.05));
Example 6: math floor javascript
console.log(Math.floor(7.25));
console.log(Math.floor(0.99));
console.log(Math.floor(-2.1));
console.log(Math.floor(-9.5));
console.log(Math.floor("hello"));
console.log(Math.floor({name: 'John', age: '25'}));
console.log(Math.floor(console.log));