Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

obtain only integer not decimal js

var n = 5/3
n = Math.floor(n)
//This will return 1. 
//Math.floor returns a number less than or equal the number given
 
PREVIOUS NEXT
Tagged: #obtain #integer #decimal #js
ADD COMMENT
Topic
Name
3+3 =