home *** CD-ROM | disk | FTP | other *** search
/ 207.233.110.77 / 207.233.110.77.tar / 207.233.110.77 / web31 / Section_78401 / Students / Barzola_Henry / tutorial.10 / tutorial / spam.js < prev   
Text File  |  2011-11-30  |  404b  |  20 lines

  1. /*
  2.    New Perspectives on HTML and XHTML 5th Edition
  3.    Tutorial 10
  4.    Tutorial Case
  5.  
  6.  
  7.    Function List:
  8.    stringReverse
  9.       Used to reverse the order of characters in a text string
  10.  
  11. */
  12.  
  13.  
  14. function stringReverse(textString) {
  15.    if (!textString) return '';
  16.    var revString='';
  17.    for (i = textString.length-1; i>=0; i--)
  18.        revString+=textString.charAt(i)
  19.    return revString;
  20. }