how to reverse a string using array in javascript code example Example: reverse string js const solution = (str) => str.split("").reverse().join("");