Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variáveis declaradas com let são "içadas" para começo do bloco em que elas são definidas (isso é conhecido também pelo termo, hoisting). #23832

Open
ogeorgecarlos opened this issue Sep 29, 2024 · 0 comments
Labels
l10n-pt-br Issues related to Brazilian Portuguese needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened.

Comments

@ogeorgecarlos
Copy link

MDN URL

https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Statements/let

What specific section or headline is this issue about?

Variáveis declaradas com let são "içadas" para começo do bloco em que elas são definidas (isso é conhecido também pelo termo, hoisting).

What information was incorrect, unhelpful, or incomplete?

Variáveis declaradas com let são "içadas" para começo do bloco em que elas são definidas (isso é conhecido também pelo termo, hoisting).

What did you expect to see?

A contrário das variáveis declaradas com a Keyword var, variáveis declaradas com let não são "içadas" (hoisting) para começo do bloco em que elas são definidas.

Ou seja, ao tenta usar a variável antes da declaração da mesma, você receberá um erro do tipo "ReferenceError".

Do you have any supporting links, references, or citations?

https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Statements/let#escopo_de_bloco

Do you have anything more you want to share?

No response

MDN metadata

Page report details
@ogeorgecarlos ogeorgecarlos added l10n-pt-br Issues related to Brazilian Portuguese needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
l10n-pt-br Issues related to Brazilian Portuguese needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened.
Projects
None yet
Development

No branches or pull requests

1 participant