diff options
author | Florian Dieminger <me@fiji-flo.de> | 2021-02-11 18:20:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-11 18:20:58 +0100 |
commit | 2318b37e3fd17a3e76a29b9be7d1ce82f040c3bb (patch) | |
tree | 5e640d40fd69dc380b04e01de981a345e0141ffa /files/es/web/javascript/reference/global_objects/string/tostring | |
parent | 6aa6274d2ad3e22e7f5e69b1d7531a5eaeaf5666 (diff) | |
parent | 8a5554c6fae83e92b10c8dbe5b82108cb44fad6c (diff) | |
download | translated-content-2318b37e3fd17a3e76a29b9be7d1ce82f040c3bb.tar.gz translated-content-2318b37e3fd17a3e76a29b9be7d1ce82f040c3bb.tar.bz2 translated-content-2318b37e3fd17a3e76a29b9be7d1ce82f040c3bb.zip |
Merge pull request #53 from fiji-flo/unslugging-es
Unslugging es
Diffstat (limited to 'files/es/web/javascript/reference/global_objects/string/tostring')
-rw-r--r-- | files/es/web/javascript/reference/global_objects/string/tostring/index.html | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/files/es/web/javascript/reference/global_objects/string/tostring/index.html b/files/es/web/javascript/reference/global_objects/string/tostring/index.html new file mode 100644 index 0000000000..52f14051a0 --- /dev/null +++ b/files/es/web/javascript/reference/global_objects/string/tostring/index.html @@ -0,0 +1,29 @@ +--- +title: String.prototype.toString() +slug: Web/JavaScript/Reference/Global_Objects/String/toString +tags: + - JavaScript + - Method + - Prototype + - String +translation_of: Web/JavaScript/Reference/Global_Objects/String/toString +original_slug: Web/JavaScript/Referencia/Objetos_globales/String/toString +--- +<p>{{JSRef("Objetos_globales", "String")}}</p> +<h2 id="Resumen" name="Resumen">Resumen</h2> +<p>El <strong><code>toString()</code></strong> método devuelve una cadena que representa al objeto especificado.</p> +<h2 id="Sintaxis" name="Sintaxis">Sintaxis</h2> +<pre><code><em>cadena</em>.toString() </code></pre> +<h2 id="Descripci.C3.B3n" name="Descripci.C3.B3n">Descripción</h2> +<p>El objeto <code>String</code> sobreescribe el método <code>toString</code> del objeto {{jsxref("Object")}} object; no hereda {{jsxref("Object.toString()")}}. Para objetos <code>String</code>, el método <code>toString</code> devuelve una cadena que representa al objeto.</p> +<h2 id="Ejemplos" name="Ejemplos">Ejemplos</h2> +<h3 id="Ejemplo:_Usando_toString" name="Ejemplo:_Usando_toString">Ejemplo: Usando <code>toString</code></h3> +<p>El siguiente ejemplo muestra el valor cadena de un objeto String:</p> +<pre class="brush: js">cadena = new String("Hello world"); +alert(cadena.toString()) // Displays "Hello world" +</pre> +<h2 id="Vea_Tambi.C3.A9n" name="Vea_Tambi.C3.A9n">Vea También</h2> +<ul> + <li>{{jsxref("Object.prototype.toSource()")}}</li> + <li>{{jsxref("String.prototype.valueOf()")}}</li> +</ul> |