-
Notifications
You must be signed in to change notification settings - Fork 112
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
Functions - Local variables and outer variables headers #48
Functions - Local variables and outer variables headers #48
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
The file seems that is not complete.
Thanks,
Osvaldo.
``` | ||
|
||
The outer variable is only used if there's no local one. So an occasional modification may happen if we forget `let`. | ||
A variável externa é apenas usada se não existir uma local. Então, uma modificação ocasional pode acontencer se esquercermos do `let`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- "...pode
acontenceracontecer seesquercermosesquecermos do..."
|
||
If a same-named variable is declared inside the function then it *shadows* the outer one. For instance, in the code below the function uses the local `userName`. The outer one is ignored: | ||
Se uma variável com o mesmo nome é declarada dentro da função, então ela *shadows* a externa. Por exemplo, no código abaixo, a função usa o `userName` local. O exterior é ignorado: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- "...então ela encobre (shadows) a externa."
(encobre e shadows in italics)
alert(message); | ||
} | ||
|
||
// the function will create and use its own userName | ||
// a função criará e usará seu próprio userName |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- "...usará o seu próprio..."
|
||
Usually, a function declares all variables specific to its task. Global variables only store project-level data, and it's important that these variables are accessible from anywhere. Modern code has few or no globals. Most variables reside in their functions. | ||
Normalmente, uma função declara todas as variáveis específicas de sua tarefa. As variáveis globais armazenam apenas dados em nível de projeto e é importante que essas variáveis sejam acessíveis de qualquer lugar. Código moderno tem poucos ou nenhum globais. A maioria das variáveis reside em suas funções. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- "...específicas
depara a sua tarefa." - "...dados
ema nível de projeto..." - "...
poucospoucas ounenhumnenhumas globais."
Please make the requested changes. After it, add a comment "/done". |
|
Hi @dheyson please is this still in progress? |
Hey @odsantos , sorry for a long time without availability. |
@dheyson Oh, sorry for any misunderstanding. Checking, mostly, please no pressure. Thank you. |
Hello @adriavieira314 , Still working on this? The conflicts remain. Thanks, |
Você conseguiria evoluir este PR ? ⭐ |
Eu atualizei o repositório do @dheysonalves com a Poderia verificar a resolução dos apontamentos e rever o novo conteúdo traduzido? |
/done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems good to me, I approve it.
@danilolmc, could you review this pull request and approve it if it is fine? |
@nazarepiedady, LGTM! ❤️ |
Translate Functions basics headers: