floor in maths code example
Example 1: ceil and floor
Examples of Floor:
=====================
Input : 2.5
Output : 2
Input : -2.1
Output : -3
Input : 2.9
Output : 2
===============================
Examples of Ceil:
=====================
Input : 2.5
Output : 3
Input : -2.1
Output : -2
Input : 2.9
Output : 3
Example 2: math.floor
console.log(Math.floor(5.95));
console.log(Math.floor(5.05));
Example 3: 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));