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

Functions - Local variables and outer variables headers #48

Merged
merged 4 commits into from
Aug 13, 2024

Conversation

dheysonalves
Copy link
Contributor

Translate Functions basics headers:

  • Local variables
  • Outer variables

Copy link
Contributor

@odsantos odsantos left a 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`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • "...pode acontencer acontecer se esquercermos esquecermos 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:
Copy link
Contributor

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
Copy link
Contributor

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • "...específicas de para a sua tarefa."
  • "...dados em a nível de projeto..."
  • "...poucos poucas ou nenhum nenhumas globais."

@javascript-translate-bot

Please make the requested changes. After it, add a comment "/done".
Then I'll ask for a new review 👻

@CLAassistant
Copy link

CLAassistant commented May 15, 2020

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@odsantos
Copy link
Contributor

Hi @dheyson please is this still in progress?
If so, could you also resolve the conflicts? Otherwise, could you inform about an unavailability?
Thank you.

@dheysonalves
Copy link
Contributor Author

Hey @odsantos , sorry for a long time without availability.
On this Saturday, gonna solve these conflicts. Sorry for this.

@odsantos
Copy link
Contributor

@dheyson Oh, sorry for any misunderstanding. Checking, mostly, please no pressure. Thank you.

@odsantos
Copy link
Contributor

Hello @adriavieira314 ,

Still working on this? The conflicts remain.

Thanks,
Osvaldo.

@jonnathan-ls
Copy link
Contributor

@dheysonalves

Você conseguiria evoluir este PR ? ⭐
Poderia resolver os conflitos existentes e a revisão solicitada pelo @odsantos ? ❤️

@jonnathan-ls
Copy link
Contributor

@odsantos

Eu atualizei o repositório do @dheysonalves com a master resolvendo os conflitos existentes. Também finalizei a tradução do restante do artigo introduzido pelo conteúdo em inglês da branch principal , assim como as sugestões de seu code review.

Poderia verificar a resolução dos apontamentos e rever o novo conteúdo traduzido?

@jonnathan-ls
Copy link
Contributor

/done

@nazarepiedady nazarepiedady requested review from a team February 5, 2024 16:35
Copy link
Member

@nazarepiedady nazarepiedady left a 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.

@nazarepiedady
Copy link
Member

@danilolmc, could you review this pull request and approve it if it is fine?

@danilolmc
Copy link
Contributor

@nazarepiedady, LGTM! ❤️

@nazarepiedady nazarepiedady merged commit da79189 into javascript-tutorial:master Aug 13, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants