home *** CD-ROM | disk | FTP | other *** search
/ 207.233.110.77 / 207.233.110.77.tar / 207.233.110.77 / web31 / Section_35397 / Martins_Jaymn / tutorial.10 / review / random.js < prev   
Text File  |  2011-05-06  |  290b  |  16 lines

  1. /*
  2.    New Perspectives on HTML and XHTML 5th Edition
  3.    Tutorial 10
  4.    Review Assignment
  5.  
  6.  
  7.    Function List:
  8.    randomInteger()
  9.       Used to reverse the order of characters in a text string
  10.  
  11. */
  12.  
  13.  
  14. function randomInteger(size) {
  15.    return Math.floor((size+1)*Math.random());
  16. }