@@ -59,23 +59,22 @@ la **misma** propiedad llamada `value`.
59
59
> a ` Function.prototype ` pero no a ` Foo.prototype ` ;
60
60
> por ende, ` method ` no estará en la cadena de prototipos.
61
61
62
- ### Property Lookup
62
+ ### Búsqueda de Propiedades
63
63
64
- When accessing the properties of an object , JavaScript will traverse the
65
- prototype chain ** upwards ** until it finds a property with the requested name .
64
+ Cuando se accede a una propiedad de un objeto , JavaScript recorre la cande de prototipos
65
+ hacia ** arriba ** hasta que encuentr una propiedad con el nombre solicitado .
66
66
67
- When it reaches the top of the chain - namely ` Object.prototype ` - and still
68
- hasn't found the specified property, it will return the value
69
- [ undefined] ( #core.undefined ) instead.
67
+ Cuando llega a la cima de la cadena - normalmente ` Object.prototype ` - y aun no
68
+ encuentra un metodo con el nombre especificado, retorna el valor [ undefined] ( #core.undefined ) .
70
69
71
- ### The Prototype Property
70
+ ### La Propiedad Prototipo
72
71
73
- While the prototype property is used by the language to build the prototype
74
- chains, it is still possible to assign ** any ** given value to it. Although
75
- primitives will simply get ignored when assigned as a prototype .
72
+ Aunque la propiedad Prototipo es usada por el lenguaje para construir la cadena de prototipos,
73
+ es posible asignarle ** cualquier ** valor. Aunque los tipos primitivos
74
+ simplemente seran ignorados cuando lo haga de esta forma .
76
75
77
76
function Foo() {}
78
- Foo.prototype = 1; // no effect
77
+ Foo.prototype = 1; // no tiene efecto
79
78
80
79
Assigning objects, as shown in the example above, will work, and allows for dynamic
81
80
creation of prototype chains.
@@ -112,5 +111,4 @@ unless it is for the sake of compatibility with newer JavaScript features.
112
111
113
112
[ 1 ] : http://en.wikipedia.org/wiki/Monkey_patch
114
113
[ 2 ] : http://prototypejs.org/
115
- [ 3 ] : https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/forEach
116
-
114
+ [ 3 ] : https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/for
0 commit comments