Get to know MDN better
Esta página ha sido traducida del inglés por la comunidad. Aprende más y únete a la comunidad de MDN Web Docs.
This feature is well established and works across many devices and browser versions. It’s been available across browsers since septiembre de 2015.
El método codePointAt() devuelve un entero no negativo que equivale al valor Unicode code point del carácter.
Índice del carácter en la cadena del que se quiere obtener el valor del Unicode code point.
Un número que equivale al valor code point del carácter especificado en el índice de la cadena; devuelve undefined si no se encuentra carácter en la posición especifica.
If there is no element at the specified position, undefined is returned. If no UTF-16 surrogate pair begins at pos, the code unit at pos is returned.
The following extends Strings to include the codePointAt() function as specified in ECMAScript 2015 for browsers not supporting it natively.
| ECMAScript® 2027 Language Specification # sec-string.prototype.codepointat |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 5 ago 2023 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.