JS: String.fromCodePoint (Char ID to Char)

By Xah Lee. Date: . Last updated: .

(new in ECMAScript 2015)

String.fromCodePoint(char_id_1, char_id_2, etc)

create a string from Code Point (Char ID).

/* create string from unicode codepoints */

console.log(String.fromCodePoint(97, 129419));
// a🦋

/*
97 is the codepoint for lowercase letter a
129419 is the codepoint for 🦋 BUTTERFLY
*/

To easily find a character's codepoint, see Unicode Search 🔎

JavaScript. String, Char, Encoding, Hexadecimal