Reverse a string- problem with joining an array

My code:

function reverseString(str) {
var arr=[];
  
  for(var i=0;i<str.length;i++)
    {
  arr[i]=str[str.length-1-i];
      }
  arr.join('');
  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("").
Thanks!

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