Reverse a string why dosn't work

function reverseString(str) {
var inverted_str = "";
var array_str = Array.from(str);

for(var i = array_str.lenght-1; i >= 0 ; i--)
  inverted_str += array_str[i];

str = inverted_str;

return str;


are you sure this is how you spell it?


What is array_str.lenght :stuck_out_tongue:
Damn those typos

1 Like

Yea, can we have a category for “truly lame thing I did today”? What brace instead of bracket? Grateful for consoles that say “undefined on line 34…”

1 Like

I would post with alarming frequency. :sob:

1 Like