Explica este código JavaScript
console.log("I want pizza"[0])
- A:
"""
- B:
"I"
- C:
SyntaxError
- D:
undefined
Respuesta en el primer comnetario.
For further actions, you may consider blocking this person and/or reporting abuse
Paul Guilbert -
Ives van Hoorne -
shrey vijayvargiya -
Sathish Kumar N -
Once suspended, duxtech will not be able to comment or publish posts until their suspension is removed.
Once unsuspended, duxtech will be able to comment and publish posts again.
Once unpublished, all posts by duxtech will become hidden and only accessible to themselves.
If duxtech is not suspended, they can still re-publish their posts from their dashboard.
Once unpublished, this post will become invisible to the public and only accessible to Cristian Fernando .
They can still re-publish the post if they are not suspended.
Thanks for keeping DEV Community safe. Here is what you can do to flag duxtech:
Unflagging duxtech will restore default visibility to their posts.
Top comments (4)
Respuesta:
B:
"I"
Las cadenas de texto en javascript son iterables, por ello, al igual que con los arreglos es posible acceder a sus caracteres individuales con la notación de corchetes.
Muchas gracias profe @gndx
Ver su like en mi post me llena de motivación. Un saludo!
Cristian, tirame un DM en twitter que tengo un proyecto inspirado en esto que haces y podemos colaborar, si te interesa.
Ya le mande DM profe