You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 1-js/05-data-types/02-number/article.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ In modern JavaScript, there are two types of numbers:
4
4
5
5
1. Regular numbers in JavaScript are stored in 64-bit format [IEEE-754](https://en.wikipedia.org/wiki/IEEE_754-2008_revision), also known as "double precision floating point numbers". These are numbers that we're using most of the time, and we'll talk about them in this chapter.
6
6
7
-
2. BigInt numbers, to represent integers of arbitrary length. They are sometimes needed, because a regular number can't exceed <code>2<sup>53</sup></code> or be less than <code>-2<sup>53</sup></code>. As bigints are used in few special areas, we devote them a special chapter <info:bigint>.
7
+
2. BigInt numbers, to represent integers of arbitrary length. They are sometimes needed, because a regular number can't safely exceed <code>2<sup>53</sup></code> or be less than <code>-2<sup>53</sup></code>. As bigints are used in few special areas, we devote them a special chapter <info:bigint>.
8
8
9
9
So here we'll talk about regular numbers. Let's expand our knowledge of them.
10
10
@@ -53,7 +53,7 @@ Just like before, using `"e"` can help. If we'd like to avoid writing the zeroes
53
53
let ms =1e-6; // six zeroes to the left from 1
54
54
```
55
55
56
-
If we count the zeroes in `0.000001`, there are 6 of them. So naturally it's `1e-6`.
56
+
If we count the zeroes in `0.000001`, there are 6 of them. So naturally it's `1e-6`.
57
57
58
58
In other words, a negative number after `"e"` means a division by 1 with the given number of zeroes:
59
59
@@ -329,7 +329,7 @@ let num = +prompt("Enter a number", '');
329
329
alert( isFinite(num) );
330
330
```
331
331
332
-
Please note that an empty or a space-only string is treated as `0` in all numeric functions including `isFinite`.
332
+
Please note that an empty or a space-only string is treated as `0` in all numeric functions including `isFinite`.
Copy file name to clipboardExpand all lines: 1-js/07-object-properties/01-property-descriptors/article.md
+11-10Lines changed: 11 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ Nós não vimos eles ainda, porque geralmente eles não aparecem. Quando criamos
19
19
20
20
Primeiro, vamos ver como obter esses sinalizadores.
21
21
22
-
O método [Object.getOwnPropertyDescriptor](mdn:js/Object/getOwnPropertyDescriptor) nos permite consultar a informação *completa* sobre a propriedade.
22
+
O método [Object.getOwnPropertyDescriptor](https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor) nos permite consultar a informação *completa* sobre a propriedade.
Para mudar os sinalizadores, nós podemos usar o [Object.defineProperty](mdn:js/Object/defineProperty).
57
+
Para mudar os sinalizadores, nós podemos usar o [Object.defineProperty](https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty).
58
58
59
59
A sintaxe é:
60
60
@@ -144,6 +144,7 @@ alert(user.name); // John
144
144
user.name="Alice"; // Erro
145
145
```
146
146
147
+
147
148
## Não-enumerável
148
149
149
150
Agora, vamos adicionar um `toString` customizado ao `user`.
@@ -274,7 +275,7 @@ We can change `writable: true` to `false` for a non-configurable property, thus
274
275
275
276
## Object.defineProperties
276
277
277
-
Existe um método [Object.defineProperties(obj, descriptors)](mdn:js/Object/defineProperties) que permite definir várias propriedades de uma vez.
278
+
Existe um método [Object.defineProperties(obj, descriptors)](https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) que permite definir várias propriedades de uma vez.
278
279
279
280
A sintaxe é:
280
281
@@ -300,7 +301,7 @@ Então, nós podemos configurar várias propriedades de uma vez.
300
301
301
302
## Object.getOwnPropertyDescriptors
302
303
303
-
Para obter todos os sinalizadores de propriedade de uma vez, nós podemos usar o método [Object.getOwnPropertyDescriptors(obj)](mdn:js/Object/getOwnPropertyDescriptors).
304
+
Para obter todos os sinalizadores de propriedade de uma vez, nós podemos usar o método [Object.getOwnPropertyDescriptors(obj)](https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptors).
304
305
305
306
Juntamente com `Object.defineProperties` isso pode ser usado como um jeito "incluindo-sinalizadores" de clonar objetos:
306
307
@@ -326,24 +327,24 @@ Descritores de propriedade atuam no mesmo nível de propriedades individuais.
326
327
327
328
Também existem métodos que limitam o acesso ao objeto *inteiro*:
Copy file name to clipboardExpand all lines: 2-ui/4-forms-controls/3-events-change-input/article.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ For instance, the code below prevents all such events and shows what we are tryi
64
64
65
65
Please note, that it's possible to copy/paste not just text, but everything. For instance, we can copy a file in the OS file manager, and paste it.
66
66
67
-
That's because `clipboardData` implements `DataTransfer` interface, commonly used for drag'n'drop and copy/pasting. It's bit beyound our scope now, but you can find its methods [in the specification](https://html.spec.whatwg.org/multipage/dnd.html#the-datatransfer-interface).
67
+
That's because `clipboardData` implements `DataTransfer` interface, commonly used for drag'n'drop and copy/pasting. It's bit beyond our scope now, but you can find its methods [in the specification](https://html.spec.whatwg.org/multipage/dnd.html#the-datatransfer-interface).
68
68
69
69
```warn header="ClipboardAPI: user safety restrictions"
70
70
The clipboard is a "global" OS-level thing. So most browsers allow read/write access to the clipboard only in the scope of certain user actions for the safety, e.g. in `onclick` event handlers.
Copy file name to clipboardExpand all lines: 7-animation/2-css-animations/article.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -433,7 +433,7 @@ A propriedade `transform` é uma grande escolha, porque:
433
433
434
434
Por outras palavras, o navegador calcula a Layout (tamanhos, posições), pinta-a com cores, fundo, etc no estágio Paint, e depois aplica `transform` a caixas de elementos que precisarem.
435
435
436
-
Mudanças (animações) da propriedade `transform` nunca desencadeiam os passos Layout e Paint. E ainda mais, o navegador explora o acelerador de gráficos (um *chip* especial na *CPU* ou placa gráfica) para transformações CSS, tornando-as muito eficientes.
436
+
Mudanças (animações) da propriedade `transform` nunca desencadeiam os passos Layout e Paint. E ainda mais, o navegador explora o acelerador de gráficos (um *chip* especial na *CPU* ou placa gráfica) para transformações CSS, tornando-as assim muito eficientes.
437
437
438
438
Felizmente, a propriedade `transform` é muito poderosa. Ao usar `transform` em um elemento, você pode rodá-lo e virá-lo, esticá-lo e encolhê-lo, deslocá-lo, e [muito mais](https://developer.mozilla.org/pt-BR/docs/Web/CSS/transform), Assim, em vez das propriedades `left/margin-left` nós podemos usar `transform: translateX(…)`, usar `transform: scale` para aumentar o tamanho de um elemento, etc.
0 commit comments