String Static Methods

String.fromCharCode()

Returns a string created by using the specified sequence of Unicode values.

String.fromCodePoint()  

Returns a string created by using the specified sequence of code points.

String.raw()  

Returns a string created from a raw template string. Special characters are not escaped, but expressions are interpolated.


console.log("abcd".charAt(2));
console.log(String.fromCharCode(65, 66, 67));

console.log(String.fromCodePoint(194564));
console.log(String.fromCodePoint(0x1D306, 0x61, 0x1D307));

console.log(String.raw`Hi\n${2 + 3}!`);
console.log(String.raw({ raw: ['foo', 'bar', 'baz'] }, 2 + 3, 'Java' + 'Script'));

c ABC 你 "\uD834\uDF06a\uD834\uDF07" Hi\n5! foo5barJavaScriptbaz