Mainly used to Str.charcodeat () and String.fromCharCode () method
--use charCodeAt () to get the Unicode encoding of a specific character in the string.
--fromCharCode () can accept one (or more) of the specified Unicode value, and then return the corresponding string.
The Unicode value for the generated uppercase A is the Generatebig_1 function () {var str = [];
for (Var i=65;i<91;i++) {Str.push (String.fromCharCode (i));
return str;
The Unicode value for uppercase A is generated as the Generatesmall_1 function () {var str = [];
for (Var i=97;i<123;i++) {Str.push (String.fromCharCode (i));
return str;
//Convert string to Unicode code function tounicode (str) {var codes = [];
for (Var i=0;i<str.length;i++) {Codes.push (Str.charcodeat (i));
return codes;
function Generatesmall () {var ch_small = ' a ';
var str_small = ';
for (Var i=0;i<26;i++) {Str_small + = String.fromCharCode (ch_small.charcodeat (0) +i);
return str_small;
function Generatebig () {var ch_big = ' A ';
var str_big = ';
for (Var i=0;i<26;i++) {Str_big + = String.fromCharCode (ch_big.charcodeat (0) +i);
return str_big;
} console.log (Generatebig ());
Console.log (Generatesmall ());
Console.log (Tounicode (Generatebig ()));
Console.log (Tounicode (Generatesmall ()));
Console.log (Generatebig_1 ()); COnsole.log (Generatesmall_1 ());
But the result--"
Where fromCharCode plays a big role in HTML entity-character conversions