floor in js

JavaScript
Input  : Math.floor(4.23)
Output : 4

Input  : Math.floor(0.8)
Output : 0

Source

Also in JavaScript: