You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 1-js/09-classes/06-instanceof/article.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,7 +65,7 @@ El algoritmo de `obj instanceof Class` funciona más o menos de la siguiente man
65
65
66
66
let obj = { canEat:true };
67
67
68
-
alert(obj instanceof Animal); // verdadero: Animal[Symbol.hasInstance](obj) es llamadoda
68
+
alert(obj instanceof Animal); // verdadero: Animal[Symbol.hasInstance](obj) es llamada
69
69
```
70
70
71
71
2. La mayoría de las clases no tienen `Symbol.hasInstance`. En ese caso, se utiliza la lógica estándar:`obj instanceOf Class` comprueba si `Class.prototype` es igual a uno de los prototipos en la cadena de prototipos `obj`.
@@ -139,7 +139,7 @@ Esa es su implementación de `toString`. Pero hay una característica oculta que
139
139
140
140
¿Suena extraño? En efecto. Vamos a desmitificar.
141
141
142
-
Mediante[especificación](https://tc39.github.io/ecma262/#sec-object.prototype.tostring), el `toString` incorporado puede extraerse del objeto y ejecutarse en el contexto de cualquier otro valor. Y su resultado depende de ese valor.
142
+
Por esta[especificación](https://tc39.github.io/ecma262/#sec-object.prototype.tostring), el `toString` incorporado puede extraerse del objeto y ejecutarse en el contexto de cualquier otro valor. Y su resultado depende de ese valor.
0 commit comments