Skip to content

Commit f1cb7da

Browse files
Update 1-js/04-object-basics/07-optional-chaining/article.md
Co-authored-by: joaquinelio <[email protected]>
1 parent 3bf37d3 commit f1cb7da

File tree

1 file changed

+1
-1
lines changed
  • 1-js/04-object-basics/07-optional-chaining

1 file changed

+1
-1
lines changed

1-js/04-object-basics/07-optional-chaining/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ La sintaxis `?.` tiene tres formas:
165165

166166
1. `obj?.prop` -- devuelve `obj.prop` si `obj` existe, si no, `undefined`.
167167
2. `obj?.[prop]` -- devuelve `obj[prop]` si `obj` existe, si no, `undefined`.
168-
3. `obj?.method()` -- llama a `obj.method()` si `obj` existe, sino devuelve `undefined`.
168+
3. `obj?.method()` -- llama a `obj.method()` si `obj` existe, si no devuelve `undefined`.
169169

170170
Como podemos ver, todos ellos son sencillos y fáciles de usar. El `?.` comprueba la parte izquierda para `null/undefined` y permite que la evaluación continúe si no es así.
171171

0 commit comments

Comments
 (0)