

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Math.floor() function in JavaScript
The floor() function of the Math object accepts a floating point number and returns the largest integer less than or equal to the given number. If the given number itself is an integer this function returns the same.
Syntax
Its Syntax is as follows
Math.floor(160)
Example
<html> <head> <title>JavaScript Example</title> </head> <body> <script type="text/javascript"> var result = Math.floor(160.98); document.write("Floor value: "+result); </script> </body> </html>
Output
Floor value: 160
- Related Questions & Answers
- Math. fround() function in JavaScript
- Math. hypot() function in JavaScript
- PHP floor() Function
- floor() function in PHP
- Get minimum number without a Math function JavaScript
- Implementing Math function and return m^n in JavaScript
- floor() and ceil() function Python
- JavaScript Math Object example
- What are JavaScript Math Functions?
- What is math object in JavaScript?
- What is Math Object in JavaScript Program?
- Math Class in C#
- Java multiplyExact() in Math
- Check for perfect square without using Math libraries - JavaScript
- In MySQL, how CEILING() and FLOOR() functions are different from ROUND() function?
- Math class methods in C#
Advertisements