I\'m a beginner to Javascript so forgive me if I sound dumb because I learned some Javascript from W3Fools (which are really difficult tutorials - they don\'t explain anythi
Use this:
function int(a) { return Math.floor(a); }
And yo can use it like this:
var result = int(2.1 + 8.7 + 9.3); //int(20.1) alert(result); //alerts 20