Skip to content

Latest commit

 

History

History
59 lines (50 loc) · 1.33 KB

File metadata and controls

59 lines (50 loc) · 1.33 KB
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
devlang-javascript
language-reference
JavaScript
TypeScript
DHTML
7c4c057b-c67a-4b10-afdd-4f75c7c5988c
3
mikejo5000
mikejo
ghogen

String.fromCodePoint Function (JavaScript)

Returns the string associated with a Unicode UTF-16 code point.

Syntax

String.fromCodePoint(...codePoints);  

Parameters

...codePoints
Required. A rest parameter that specifies one or more UTF-16 code point values.

Remarks

This function throws a RangeError exception if ...codePoints is not a valid UTF-16 code point.

Example

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   

Requirements

[!INCLUDEjsv12]