Unblock JavaScript in Chrome

If you are on Windows using Google Chrome, you may sometimes keep trying to open your localhost URL only to have Chrome block your JavaScript from loading. To enable JavaScript, right click on your web page to Inspect Element.

  1. Click the console tab.
  2. Click the gear icon in the upper right and go to settings.
  3. Uncheck the “Disable JavaScript” checkbox.
Advertisements

Bonfire: Reverse a String

Completing the Bonfire: Reverse a String on FreeCodeCamp

Challenge:

Reverse the provided string.

You may need to turn the string into an array before you can reverse it.

Your result must be a string.

Use: .reverse()
.split()
.join()


Solution:

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

reverseString("hello");