SOURCE

function reverseString(str) {
	const tmpArr = [];
  for(let i = str.length - 1; i >= 0; i--) {
    tmpArr.push(str.charAt(i));
  }
  return tmpArr.join('');
}

console.log(reverseString('abcde'));
console 命令行工具 X clear

                    
>
console