Javascript - Unicode

1 - About

javascript is encoding this character in unicode UTF-16

See also: HTML - Unicode Character

3 - Cheatsheat

  • \u00A0 whitespace

4 - Syntax

4.1 - Literal


console.log('\u00E9');
console.log('\uD83D\uDE00');

where:

4.2 - fromCodePoint

Example with the grinning face emoji. This character has the unicode code point:


let grinningFaceHexa = String.fromCodePoint(0x1F600);
let grinningFaceDeci = String.fromCodePoint(128512);
console.log('HexaDecimal grinning face '+grinningFaceHexa);
console.log('Decimal grinning face '+grinningFaceDeci);

Output:

where:


Data Science
Data Analysis
Statistics
Data Science
Linear Algebra Mathematics
Trigonometry

Powered by ComboStrap