Skip to content

Commit 906c9c8

Browse files
committed
UPDATE
1 parent 9cc4168 commit 906c9c8

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

JS/JS-br.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -444,9 +444,9 @@ Cada objeto tem uma propriedade interna, denotada como `__proto__`, que é uma r
444444
445445
Objetos podem usar `__proto__` para procurar propriedade que não fazem parte do objeto, e `__proto__` conecta os objetos juntos para formar uma cadeida de prototype.
446446
447-
# Inheritance
447+
# Herança
448448
449-
In ES5, we can solve the problems of inheritance by using the following ways:
449+
No ES5, podemos resolve os problema de herança usando os seguintes passos:
450450
451451
```js
452452
function Super() {}
@@ -466,9 +466,9 @@ Sub.prototype = Object.create(Super.prototype, {
466466
})
467467
```
468468

469-
The above idea of inheritance implementation is to set the `prototype` of the child class as the `prototype` of the parent class.
469+
A idéia de herança implementada acima é para definir o `prototype` da classe filho como o `prototype` da classe pai.
470470

471-
In ES6, we can easily solve this problem with the `class` syntax:
471+
No ES6, podemos facilmente resolver esse problema com a sintaxe `class`:
472472

473473
```js
474474
class MyDate extends Date {
@@ -480,7 +480,9 @@ let myDate = new MyDate()
480480
myDate.test()
481481
```
482482
483-
However, ES6 is not compatible with all browsers, so we need to use Babel to compile this code.
483+
Contudo, ES6 não é compátivel com todos os navegadores, então usamos o Babel para compilar esser código.
484+
485+
Se chamar `myDate.test()` com o código compilado,
484486
485487
If call `myDate.test()` with compiled code, you’ll be surprised to see that there’s an error:
486488

0 commit comments

Comments
 (0)