Created
December 2, 2015 19:32
-
-
Save sabotuer99/5e134e8c13a3991d11bd to your computer and use it in GitHub Desktop.
Javascript to print out the character codes in a string
This file contains 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
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