Hello
I try to learn the String.charCodeAt(index) method
Here is a snippet that demonstrate that the first index is allways 48 independentely of the character.
How work's it (I was expecting that each letter has her unicode-number equivalent.
function unicoding(str) {
for (i = 0; i < str.length; i ++) {
console.log(String.charCodeAt(i))
}
return str;
}
unicoding("abce");
unicoding("abcde");
unicoding("zabcdef");
unicoding("yzabcdefg");
48
49
50
51
48
49
50
51
52
48
49
50
51
52
53
54
48
49
50
51
52
53
54
55
56
=> 'yzabcdefg'
what is the secret of this numbers.
Sorry if it is very trivial.