function stringReverse(string){ var str = '' for(const letter of string){ str = letter + str; } return str; } console.log(stringReverse("Hello World")); //Output will be //dlroW olleH