JS: String.fromCodePoint

By Xah Lee. Date: . Last updated: .

New in JS2015.

String.fromCodePoint(codepoint1, codepoint2, etc)
Return a string, each character corresponds to the Codepoint in argument.
// create string from unicode codepoints

console.log(String.fromCodePoint(97, 128514) === "a😂");

// 97 is the codepoint for letter “a”
// 128514 is the codepoint for the char 😂 FACE WITH TEARS OF JOY

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

JavaScript, String, Char, Encoding, Hexadecimal