JavaScript Objects The Math Object- Math floor() - Javascript Objects

What is JavaScript - Math floor Method?

JavaScript - Math floor Method method returns the largest integer less than or equal to a number.


Syntax

Its syntax is as below −

Parameter Details

x − A numbers.


Return Value

It Returns the largest integer less than or equal to a number x.


Example

Try the following sample example program.


Output

First Test Value : 10

Second Test Value : 30

Third Test Value : -3

Fourth Test Value : -3


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Javascript Objects Topics