Reverse a string- problem with joining an array

My code:

function reverseString(str) {
var arr=[];
  for(var i=0;i<str.length;i++)
  return arr;

I wonder why when I do the arr.join, I still get the separated array and not the connected word. I know its possible to do with str.split("").reverse().join("").

you are returning a array … return a string like so
var result = arr.join
return result