charCodeAt(): getting UTF-16 at given position
In above line the UTF-16 value of first char is returned. ( this is same as Unicode value of single UTF-16 code unit )
Here is an example to generate UTF-16 (same as Unicode ) numbers from a string. We will use string length and for loop to display unicode number of each char of the string.
The Output is here
From UTF-16 to CharBy using String.fromCharCode() we can get back the Char.
Here is the code to get string from UTF-16 (Unicode ).
Output will be
This article is written by plus2net.com team.