Articles → JavaScript → Math.Floor Function In Javascript

Math.Floor Function In Javascript






Purpose




NumberRounding downward to nearest integer
1.81
2.52
3.23



Example


<html><head><title>Math.Floor function demo</title><script>
            alert(Math.floor(2.8));
        </script></head><body></body></html>



Output


Picture showing the output of Math.Floor function in JavaScript

Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Friday, May 8, 2020

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250