I wan't to generate a random number and use it as a class name for an element.
Math.random();
This will generate a random number '0.7220265011042561' Since this will be used as a class within the class attribute of an element, the decimal will surely cause problems and most likely isn't valid.
How can I generate a random whole number?