Created
January 15, 2016 06:50
-
-
Save pingyen/9601ce8ee24dc2ff5b1a to your computer and use it in GitHub Desktop.
Get ASCII code of characters in a string
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
| var a = []; | |
| 'abcdefghijk'.split('').forEach(function(c) { | |
| a.push(c.charCodeAt(0)); | |
| }); | |
| console.log(a); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment