function decipher(str) { // YOU DID IT!
var newString = str.split(" ");
for(var x = 0; x < newString.length; x++ ){
for( var y = 0; y < newString[x].length; y++ ){
if(newString[x].charCodeAt(y) < 78){
String.fromCharCode(newString[x].charCodeAt(y) + 13);
}
else if(newString[x].charCodeAt(y) >= 78){
String.fromCharCode(newString[x].charCodeAt(y) - 13);
}
}
}
return newString;
}
// Update the input below to test
decipher("FREE CODE CAMP");
I've successfully translated the original code into actual words, but I'm struggling to replace them with the correct words in the new string. Any assistance would be greatly appreciated.