title: How to reverse a number/string in NodeJS?
body: <p>I have used this code to reverse a number but it is not working.</p>
  
  <pre><code>var buffer = new Buffer("&lt;inputNumber&gt;", "ucs2");
  Array.prototype.reverse.call(new Unit16Array(buffer));
  return buffer.toString("ucs2");
  </code></pre>
  
  <p>Where was I wrong? Is this approach right? Any other way of reversing a number/string without using buffer? </p>