Reverse strings using node.js