Last active
January 14, 2021 07:03
-
-
Save 0rbianta/30938aa1bb89a11ad7887ce58d66733f to your computer and use it in GitHub Desktop.
String2Hex NodeJS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const data = "Hello World"; | |
var hexs = []; | |
for(var i=0;i<data.length;i++){ | |
hexs.push(data.charCodeAt(i).toString(16)); | |
} | |
console.log(hexs); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment