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
+10-10Lines changed: 10 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 @@ We didn't see them yet, because generally they do not show up. When we create a
19
19
20
20
First, let's see how to get those flags.
21
21
22
-
The method [Object.getOwnPropertyDescriptor](mdn:js/Object/getOwnPropertyDescriptor) allows to query the *full* information about a property.
22
+
The method [Object.getOwnPropertyDescriptor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor) allows to query the *full* information about a property.
To change the flags, we can use [Object.defineProperty](mdn:js/Object/defineProperty).
57
+
To change the flags, we can use [Object.defineProperty](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty).
58
58
59
59
The syntax is:
60
60
@@ -274,7 +274,7 @@ We can change `writable: true` to `false` for a non-configurable property, thus
274
274
275
275
## Object.defineProperties
276
276
277
-
There's a method [Object.defineProperties(obj, descriptors)](mdn:js/Object/defineProperties) that allows to define many properties at once.
277
+
There's a method [Object.defineProperties(obj, descriptors)](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperties) that allows to define many properties at once.
278
278
279
279
The syntax is:
280
280
@@ -300,7 +300,7 @@ So, we can set many properties at once.
300
300
301
301
## Object.getOwnPropertyDescriptors
302
302
303
-
To get all property descriptors at once, we can use the method [Object.getOwnPropertyDescriptors(obj)](mdn:js/Object/getOwnPropertyDescriptors).
303
+
To get all property descriptors at once, we can use the method [Object.getOwnPropertyDescriptors(obj)](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptors).
304
304
305
305
Together with `Object.defineProperties` it can be used as a "flags-aware" way of cloning an object:
306
306
@@ -326,24 +326,24 @@ Property descriptors work at the level of individual properties.
326
326
327
327
There are also methods that limit access to the *whole* object:
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
@@ -76,7 +76,7 @@ For instance, the code below prevents all such events and shows what we are tryi
76
76
77
77
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.
78
78
79
-
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).
79
+
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).
80
80
81
81
```warn header="ClipboardAPI: user safety restrictions"
82
82
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 @@ The `transform` property is a great choice, because:
433
433
434
434
In other words, the browser calculates the Layout (sizes, positions), paints it with colors, backgrounds, etc at the Paint stage, and then applies `transform` to element boxes that need it.
435
435
436
-
Changes (animations) of the `transform` property never trigger Layout and Paint steps. More than that, the browser leverages the graphics accelerator (a special chip on the CPU or graphics card) for CSS transforms, thus making them very effecient.
436
+
Changes (animations) of the `transform` property never trigger Layout and Paint steps. More than that, the browser leverages the graphics accelerator (a special chip on the CPU or graphics card) for CSS transforms, thus making them very efficient.
437
437
438
438
Luckily, the `transform` property is very powerful. By using `transform` on an element, you could rotate and flip it, stretch and shrink it, move it around, and [much more](https://developer.mozilla.org/docs/Web/CSS/transform#syntax). So instead of `left/margin-left` properties we can use `transform: translateX(…)`, use `transform: scale` for increasing element size, etc.
0 commit comments