Wednesday, October 21, 2015

Bonfire Reverse a String.

Was able to solve this using MDN examples and console.log() in chrome browser.
Solution:


function reverseString(str) {
 
  return str.split("").reverse().join('');
}

reverseString("hello");


No comments:

Post a Comment