| “When does 2+2=5? When 2 is 2.49.” | |||||||||
![]() |
|||||||||
“a resource for web developers...” |
|||||||||
Up to JavaScript: Maths overview page
Experiment with using 'minus 0' technique on a string to convert to a number.
Introducing 'typeof()' which returns the type of data that has been passed to it.
Using 'isNaN()' on the data type. Examples of use of above with strings: '42.50', '42.50text' and 'text'.
Copyright © 2006-2010 justfigures.co.uk