JS 如何翻转一个字符串
Issue 欢迎在 Gtihub Issue 中回答此问题: Issue 470
Author 回答者: shfshanyue
const reverse = (s) => s.split("").reverse().join("");
Author 回答者: Bulandent
const reverse = (s) => [...s].reduceRight((acc, cur) => acc + cur);
Issue 欢迎在 Gtihub Issue 中回答此问题: Issue 470
Author 回答者: shfshanyue
const reverse = (s) => s.split("").reverse().join("");
Author 回答者: Bulandent
const reverse = (s) => [...s].reduceRight((acc, cur) => acc + cur);