Convert unsigned integer to a string whose bytes are the 256-bit (BE) representation of the integer - Javascript String Operation

Javascript examples for String Operation:String Convert

Description

Convert unsigned integer to a string whose bytes are the 256-bit (BE) representation of the integer

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width"> 
   </head> 
   <body> 
      <script>
console.log( new Uint8Array( new Uint32Array([1832]).buffer).reduceRight((r,c)=>r+("0"+c).substr(-2),""))

      </script>  
   </body>/* www.  ja  v a  2 s . co  m*/
</html>

Related Tutorials