Tutorial Resource Centre
JavaScript Mathematics Demo

Converting Strings to Numbers


Playing With Maths

Number 1


Number 2



A 'True' Random Number

This is just a quick demonstration to show that JavaScript's in-built Math.random() function generates a number between 0 and 1.


Dice Rolling

This is an example of using JavaScript's addition function, plus Math.floor() and Math.random().