Node.js examples for String:Algorithm
Add a reverse method to the String 'class' so that every instance of String can call reverse and reverse itself.
//code here/*from ww w .j a v a 2 s.c o m*/ String.prototype.reverse = function(string){ var temp = string.split('').reverse().join(''); return temp; }