Random numbers in JavaScript
Posted by: Dino Espositos WebLog,
on 07 May 2007 |
View original | Bookmarked: 0 time(s)
The Microsoft AJAX Client library serves you a so rich JavaScript language that it doesn't even look like a script language. In this regard, it makes it almost natural to think new functionalities in terms of classes. For example, random numbers. Here's a quick class to mimick the behavior of the managed Random class:// // Samples.Random :: // Generates random numbers //// Define the namespace of the classType.registerNamespace('Samples');// ConstructorSamples.Random...