| title | ms.custom | ms.date | ms.prod | ms.reviewer | ms.suite | ms.technology | ms.tgt_pltfrm | ms.topic | dev_langs | ms.assetid | caps.latest.revision | author | ms.author | manager | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
String.fromCodePoint Function (JavaScript) | Microsoft Docs |
01/18/2017 |
windows-client-threshold |
|
language-reference |
|
7c4c057b-c67a-4b10-afdd-4f75c7c5988c |
3 |
mikejo5000 |
mikejo |
ghogen |
Returns the string associated with a Unicode UTF-16 code point.
String.fromCodePoint(...codePoints);
...codePoints
Required. A rest parameter that specifies one or more UTF-16 code point values.
This function throws a RangeError exception if ...codePoints is not a valid UTF-16 code point.
The following example shows how to use the fromCodePoint function.
var str1 = String.fromCodePoint(0x20BB7);
var str2 = String.fromCodePoint(98);
var str3 = String.fromCodePoint(97, 98, 99);
if(console && console.log) {
console.log(str1);
console.log(str2);
console.log(str3);
}
// Output:
// 𠮷
// b
// abc [!INCLUDEjsv12]