Use the reverse implementation of arrays

let arr = 'abcdefg';
let res = [...arr].reverse().join('');
console.log(res); // gfedcba


  • This article is published through multiple platforms of “We Media” and will not be maintained after publication. If you have any objection to the content, you can discuss it in the GitHub below
  • The ongoing maintenance / 500 + face questions before update/notes 】…
  • [3D city modeling using three. JS (Zhuhai City)]