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 julio de 2015.
El toString() método devuelve una cadena que representa al objeto especificado.
El objeto String sobreescribe el método toString del objeto Object object; no hereda Object.toString(). Para objetos String, el método toString devuelve una cadena que representa al objeto.
El siguiente ejemplo muestra el valor cadena de un objeto String:
This page was last modified on 23 ene 2024 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.