JavaScript: 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 in Depth

JavaScript String, Char, Encoding, Hexadecimal