Skip to content

Commit f1a5f8c

Browse files
committed
Spanish updated core.undefined.md
1 parent b0c71b2 commit f1a5f8c

File tree

1 file changed

+29
-27
lines changed

1 file changed

+29
-27
lines changed

doc/es/core/undefined.md

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -16,36 +16,38 @@ puede ser sobreescrito fácilmente.
1616
> pero su nombre todavía puede por ejemplo establecer una función con el nombre
1717
> `undefined`.
1818
19-
Algunos ejemplos de cuando el valor retorna `undefined`:
19+
Algunos ejemplos cuando el valor retorna `undefined`:
2020

2121
- Acceso a la variable global (sin modificar) `undefined`.
2222
- Retorna implícitamente las funciones que no posean la sentencia `return`.
23-
- `return` statements which do not explicitly return anything.
24-
- Lookups of non-existent properties.
25-
- Function parameters which do not had any explicit value passed.
26-
- Anything that has been set to the value of `undefined`.
23+
- Sentencia `return` que no retorna nada de forma explicíta.
24+
- Búsquedas de propiedades inexistentes.
25+
- Párametros de la función que no tienen ningún valor explicíto pasado.
26+
- Cualquier valor que se estable en `undefined`.
2727

28-
### Handling Changes to the Value of `undefined`
28+
### Manejar los cambios en el valor deChanges `undefined`
2929

30-
Since the global variable `undefined` only holds a copy of the actual *value* of
31-
`undefined`, assigning a new value to it does **not** change the value of the
32-
*type* `undefined`.
30+
Dado que la variable `undefined` sólo tiene una copia del *value* de
31+
`undefined`, assigna un nuevo valor que **no** cambie el valor del
32+
*tipo* `undefined`.
3333

34-
Still, in order to compare something against the value of `undefined` it is
35-
necessary to retrieve the value of `undefined` first.
3634

37-
In order to protect code against a possible overwritten `undefined` variable, a
38-
common technique used is to add an additional parameter to an
39-
[anonymous wrapper](#function.scopes), that gets no argument passed to it.
35+
Aún con el fin de comparar con el valor de `undefined` es necesario
36+
recuperar el valor de `undefined` primero.
37+
38+
Con el fin de proteger una posible sobreescritura en la variable `undefined`,
39+
una técnica común es agregar un párametro adicional a un
40+
[wrapper anónimo](#function.scopes), que consiga ningún párametro que se le pase.
41+
4042

4143
var undefined = 123;
4244
(function(something, foo, undefined) {
43-
// undefined in the local scope does
44-
// now again refer to the value
45+
// undefined en el ámbito local
46+
// ahora hace referencia al valor
4547

4648
})('Hello World', 42);
4749

48-
Another way to achieve the same effect would be to use a declaration inside the
50+
Otra forma de lograrlo un mismo efecto es declarar dentro un
4951
wrapper.
5052

5153
var undefined = 123;
@@ -55,18 +57,18 @@ wrapper.
5557

5658
})('Hello World', 42);
5759

58-
The only difference being here, that this version results in 4 more bytes being
59-
used in case it is minified and there is no other `var` statement inside the
60-
anonymous wrapper.
60+
La única diferencia, es que está versión es de 4 bytes más que utiliza, y en
61+
caso se comprima y no hay otra declaración de 'var' dentro del
62+
wrapper anónimo.
6163

62-
### Uses of `null`
6364

64-
While `undefined` in the context of the JavaScript language is mostly used in
65-
the sense of a traditional *null*, the actual `null` (both a literal and a type)
66-
is more or less just another data type.
65+
### Uso de `null`
6766

68-
It is used in some JavaScript internals (like declaring the end of the
69-
prototype chain by setting `Foo.prototype = null`), but in almost all cases it
70-
can be replaced by `undefined`.
67+
Mientras que `undefined` en el contexto del lenguaje JavaScript es muy usado
68+
en el sentido tradicional como *null*, el actual `null` (ambos literal y de un tipo)
69+
es más o menos que otro tipo de datos.
7170

71+
Es utilizado en algunos detalles internos de JavaScript (como declarar al final de un
72+
cadena de prototipo estableciendo `Foo.prototype = null`), pero en casi todos los
73+
casos, puede ser reemplazado por `undefined`.
7274

0 commit comments

Comments
 (0)