Skip to content

Instantly share code, notes, and snippets.

@sabotuer99
Created December 2, 2015 19:32
Show Gist options
  • Save sabotuer99/5e134e8c13a3991d11bd to your computer and use it in GitHub Desktop.
Save sabotuer99/5e134e8c13a3991d11bd to your computer and use it in GitHub Desktop.
Javascript to print out the character codes in a string
function printCodes(str) {
var result = "";
for(var i = 0; i < str.length; i++){
result += str.charCodeAt(i) + " ";
}
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment