EN
JavaScript - String codePointAt() method example
0
points
// ONLINE-RUNNER:browser;
var text = 'π★🍎';
console.log(text.codePointAt(0)); // 960
console.log(text.codePointAt(1)); // 9733
console.log(text.codePointAt(2)); // 127822
Documentation
Syntax | String codePointAt(index) |
Parameters | index - position of an element in the string |
Result |
A decimal number representing the code point value of the character at the given index. If there's no element at the given index, the method returns |
Description | The codePointAt() method is used to return a non-negative integer that is the unicode code point value at the given position. |