The Unicode Standard provides a unique number for every character, no matter the platform, device, application, or language. UTF-8 is a popular Unicode encoding which has -bit code units.
\uXXXX, where X denotes four hexadecimal digits. For example, the letter
o is denoted as ‘\u006F’ in Unicode. Hence, to write the letter “foo” in Unicode, we can use the following code.
var f\u006F\u006F = 'abc'; console.log(foo)
\uXXXX syntax. The following code assigns a special Unicode character (a cow) to the variable
var str = '\uD83D\uDC04'; console.log(str)
View all Courses