0
How to reverse on node.js
how to reverse on node.js without use split(), reverse(), join() for string data ?
1 Answer
+ 3
This reverses str into out:
let out="";
for (let i=str.length-1; i>=0; i--) out += str[i];
how to reverse on node.js without use split(), reverse(), join() for string data ?