Quotes help make search much faster. Example: "Practice Makes Perfect"

Thursday, January 31, 2013

Codecademy: String Reversal - Part 2



// Sample solution

// Change this function so as to reverse strings.
// When given argument "Hello", it should return "olleH".
function reverse(str) {
    return str.split("").reverse().join("");
}

// test it:
console.log(reverse("right to left"));

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts