Advertisement
Guest User

Untitled

a guest
Sep 17th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. let str = "marek";
  2.  
  3. console.log(str.split("").reverse().join("")); // --> "keram"
  4.  
  5. // Takes string, splits into char array, reverses array, then joins back to string
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement