What is wrong with the following code
function FirstReverse(str) {
var backwards = "";
for(var i = str.length; i>=0;i--){
backwards += str[i];
}
str = backwards;
return str;
}
// keep this function call here
// to see how to enter arguments in JavaScript scroll down
FirstReverse(readline(str));
this is the first challenge on http://coderbyte.com/CodingArea/GuestEditor.php?ct=First%20Reverse&lan=JavaScript the only error it returns is ReferenceError: readline is not defined
, but readline
is what the site says to use. What is wrong here?