GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Constructor, operator "new" by PedroDousseau · Pull Request #88 · javascript-tutorial/pt.javascript.info

Conversation

@PedroDousseau

@PedroDousseau PedroDousseau commented Nov 17, 2019

Copy link
Copy Markdown
Contributor

Article translated

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@PedroDousseau
Constructor, operator "new"
7c624b7
Article translated
@javascript-translate-bot javascript-translate-bot added the review needed label Nov 17, 2019
@javascript-translate-bot
javascript-translate-bot requested a review from a team November 17, 2019 16:27
@javascript-translate-bot

javascript-translate-bot commented Nov 17, 2019

Copy link
Copy Markdown

Error: the article already has PR number in the Progress Issue #1, it's 87 ⁉️

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@CLAassistant

CLAassistant commented Nov 17, 2019 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

odsantos
odsantos requested changes Dec 27, 2019
View reviewed changes

@odsantos odsantos left a comment

Copy link
Copy Markdown
Contributor

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 Pedro,

A very good translation.
I hope not to give you much trouble with this review.

Please, feel free for giving any suggestions.

Thank you,
Osvaldo.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread 1-js/04-object-basics/06-constructor-new/2-calculator-constructor/task.md
---

# Create new Calculator
# Crie uma calculadora new

@odsantos odsantos Dec 27, 2019

Copy link
Copy Markdown
Contributor

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.

  • "# Crie uma calculadora new Calculator"

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread 1-js/04-object-basics/06-constructor-new/3-accumulator/task.md
---

# Create new Accumulator
# Crie um acumulador new

@odsantos odsantos Dec 27, 2019

Copy link
Copy Markdown
Contributor

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.

  • "# Crie um acumulador new Accumulator"

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread 1-js/04-object-basics/06-constructor-new/3-accumulator/task.md
let accumulator = new Accumulator(1); // valor inicial 1
accumulator.read(); // adiciona o valor digitado pelo usuário
accumulator.read(); // adiciona o valor digitado pelo usuário
alert(accumulator.value); // apresenta a soma destses valores

@odsantos odsantos Dec 27, 2019

Copy link
Copy Markdown
Contributor

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.

  • "// apresenta a soma destses destes valores"

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread 1-js/04-object-basics/06-constructor-new/article.md
# Construtor, operador "new"

The regular `{...}` syntax allows to create one object. But often we need to create many similar objects, like multiple users or menu items and so on.
A sintaxe regular `{...}` permite criar um objeto. Mas frequentemente precisamos criar vários objetos iguais, como diversos usuários, itens de um menu, etc.

@odsantos odsantos Dec 27, 2019

Copy link
Copy Markdown
Contributor

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.

  • "...precisamos de criar vários objetos..."

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread 1-js/04-object-basics/06-constructor-new/article.md

1. They are named with capital letter first.
2. They should be executed only with `"new"` operator.
1. Elas são nomeadas com a primeira letra em maiúsculo.

@odsantos odsantos Dec 27, 2019

Copy link
Copy Markdown
Contributor

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.

  • "...letra em maiúsculo maiúsculas."

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread 1-js/04-object-basics/06-constructor-new/article.md
john.sayHi(); // Meu nome é: John
*/!*

/*

@odsantos odsantos Dec 27, 2019

Copy link
Copy Markdown
Contributor

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.

  • missing code: available at Methods in constructor

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread 1-js/04-object-basics/06-constructor-new/article.md

- Constructor functions or, briefly, constructors, are regular functions, but there's a common agreement to name them with capital letter first.
- Constructor functions should only be called using `new`. Such a call implies a creation of empty `this` at the start and returning the populated one at the end.
- Funções construtoras ou, resumidamente, construtores, são funções regulares, mas existe um acordo comum para nomeá-las com a primeira letra em maiúsculo.

@odsantos odsantos Dec 27, 2019

Copy link
Copy Markdown
Contributor

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.

  • "...letra em maiúsculo maiúsculas ."

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread 1-js/04-object-basics/06-constructor-new/article.md
- Constructor functions or, briefly, constructors, are regular functions, but there's a common agreement to name them with capital letter first.
- Constructor functions should only be called using `new`. Such a call implies a creation of empty `this` at the start and returning the populated one at the end.
- Funções construtoras ou, resumidamente, construtores, são funções regulares, mas existe um acordo comum para nomeá-las com a primeira letra em maiúsculo.
- Funções construtoras deveriam ser chamadas apenas usando `new`. Tal chamada implica a criação de um `this` vazio no começo e retornando o completo ao final.

@odsantos odsantos Dec 27, 2019

Copy link
Copy Markdown
Contributor

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.

"...no começo e o retornando -o- completo ao final."

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread 1-js/04-object-basics/06-constructor-new/article.md
Nós podemos usar funções construtoras para fazer diversos objetos iguais.

JavaScript provides constructor functions for many built-in language objects: like `Date` for dates, `Set` for sets and others that we plan to study.
JavaScript fornece funções construtoras para muitos objetos de linguagem internos: como `Date` para datas, `Set` para armazenamento e outros que nós planejamos estudar.

@odsantos odsantos Dec 27, 2019

Copy link
Copy Markdown
Contributor

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.

  • "...muitos objetos internos de da linguagem internos:"
  • ", Set para armazenamento conjuntos e outros..."
    ('Set' in Algebra)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread 1-js/04-object-basics/06-constructor-new/article.md
Nesse capítulo nós cobrimos apenas o básico sobre objetos e construtores. Eles são essenciais para aprender mais sobre tipos de dados e funções nos próximos capítulos.

After we learn that, we return to objects and cover them in-depth in the chapters <info:prototypes> and <info:classes>.
Depois que aprendemos isto, nós voltamos para os objetos e os cobrimos a fundo nos capítulos <info:prototypes> e <info:classes>.

@odsantos odsantos Dec 27, 2019

Copy link
Copy Markdown
Contributor

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.

  • "...que aprendemos isto aprendermos isso,"

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@javascript-translate-bot javascript-translate-bot added changes requested and removed review needed labels Dec 27, 2019
@javascript-translate-bot

javascript-translate-bot commented Dec 27, 2019

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@iliakan iliakan mentioned this pull request Dec 27, 2019
Portuguese Translation Progress #1
Open
@PedroDousseau PedroDousseau closed this Sep 9, 2020
@PedroDousseau PedroDousseau mentioned this pull request Sep 9, 2020
Constructor, operator "new" #173
Closed
@PedroDousseau PedroDousseau mentioned this pull request Mar 22, 2023
Constructor, operator "new" #400
Merged
@jonnathan-ls jonnathan-ls removed the changes requested label Jun 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@odsantos odsantos odsantos requested changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@PedroDousseau @javascript-translate-bot @CLAassistant @odsantos @jonnathan-ls
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.