Numbers


All numbers are floating point
so decimal fractions are not exact.
standard operators +, -, *, /, %
parseFloat - converts a string to a number



Methods

toFixed(n) - returns the number to n decimal places


let number1 = parseInt("11 two 33"); 
let number2 = parseFloat("22 three 44");
let number3 = 11.234.toFixed(0);
let number4 = 100.6.toFixed(2);



© 2018 Better Solutions Limited. All Rights Reserved. © 2018 Better Solutions Limited TopNext