Skip to content

Commit dfeb171

Browse files
committed
More
1 parent 54bcf6c commit dfeb171

File tree

9 files changed

+11
-15
lines changed

9 files changed

+11
-15
lines changed

files/en-us/web/api/constantsourcenode/constantsourcenode/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ new ConstantSourceNode(context, options)
3232
- : A read-only {{domxref("AudioParam")}} specifying the
3333
constant value generated by the source. The default is 1.0. The normal range is
3434
\-1.0 to 1.0, but the value can be anywhere in the range from
35-
`-Infinity` to `+Infinity`.
35+
`-Infinity` to `Infinity`.
3636

3737
## Examples
3838

files/en-us/web/api/htmlmediaelement/duration/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ media in seconds.
1717
A double-precision floating-point value indicating the duration of the media in
1818
seconds. If no media data is available, the value `NaN` is returned. If the
1919
element's media doesn't have a known duration—such as for live media streams—the value
20-
of `duration` is `+Infinity`.
20+
of `duration` is `Infinity`.
2121

2222
## Examples
2323

files/en-us/web/api/htmlmediaelement/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ _This interface also inherits properties from its ancestors {{domxref("HTMLEleme
4545
- {{domxref("HTMLMediaElement.disableRemotePlayback")}}
4646
- : A boolean that sets or returns the remote playback state, indicating whether the media element is allowed to have a remote playback UI.
4747
- {{domxref("HTMLMediaElement.duration")}} {{ReadOnlyInline}}
48-
- : A read-only double-precision floating-point value indicating the total duration of the media in seconds. If no media data is available, the returned value is `NaN`. If the media is of indefinite length (such as streamed live media, a WebRTC call's media, or similar), the value is `+Infinity`.
48+
- : A read-only double-precision floating-point value indicating the total duration of the media in seconds. If no media data is available, the returned value is `NaN`. If the media is of indefinite length (such as streamed live media, a WebRTC call's media, or similar), the value is `Infinity`.
4949
- {{domxref("HTMLMediaElement.ended")}} {{ReadOnlyInline}}
5050
- : Returns a boolean that indicates whether the media element has finished playing.
5151
- {{domxref("HTMLMediaElement.error")}} {{ReadOnlyInline}}

files/en-us/web/javascript/guide/data_structures/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,12 @@ The {{jsxref("Number")}} type is a [double-precision 64-bit binary format IEEE 7
8181

8282
Values outside the representable range are automatically converted:
8383

84-
- Positive values greater than {{jsxref("Number.MAX_VALUE")}} are converted to `+Infinity`.
85-
- Positive values smaller than {{jsxref("Number.MIN_VALUE")}} are converted to `+0`.
84+
- Positive values greater than {{jsxref("Number.MAX_VALUE")}} are converted to `Infinity`.
85+
- Positive values smaller than {{jsxref("Number.MIN_VALUE")}} are converted to `0`.
8686
- Negative values smaller than -{{jsxref("Number.MAX_VALUE")}} are converted to `-Infinity`.
8787
- Negative values greater than -{{jsxref("Number.MIN_VALUE")}} are converted to `-0`.
8888

89-
`+Infinity` and `-Infinity` behave similarly to mathematical infinity, but with some slight differences; see {{jsxref("Number.POSITIVE_INFINITY")}} and {{jsxref("Number.NEGATIVE_INFINITY")}} for details.
89+
`Infinity` and `-Infinity` behave similarly to mathematical infinity, but with some slight differences; see {{jsxref("Number.POSITIVE_INFINITY")}} and {{jsxref("Number.NEGATIVE_INFINITY")}} for details.
9090

9191
The Number type has only one value with multiple representations: `0` is represented as both `-0` and `+0` (where `0` is an alias for `+0`). In practice, there is almost no difference between the different representations; for example, `+0 === -0` is `true`. However, you are able to notice this when you divide by zero:
9292

files/en-us/web/javascript/reference/global_objects/function/apply/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ let min = Math.min.apply(null, numbers);
114114

115115
// vs. loop based algorithm
116116
max = -Infinity;
117-
min = +Infinity;
117+
min = Infinity;
118118

119119
for (const n of numbers) {
120120
if (n > max) {

files/en-us/web/javascript/reference/global_objects/math/floor/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ function decimalAdjust(type, value, exp) {
9393
const adjustedValue = Math[type](`${magnitude}e${exponent - exp}`);
9494
// Shift back
9595
const [newMagnitude, newExponent = 0] = adjustedValue.toString().split("e");
96-
return Number(`${newMagnitude}e${+newExponent + exp}`);
96+
return Number(`${newMagnitude}e${Number(newExponent) + exp}`);
9797
}
9898

9999
// Decimal round

files/en-us/web/javascript/reference/global_objects/string/lastindexof/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ lastIndexOf(searchString, position)
3737

3838
- `position` {{optional_inline}}
3939

40-
- : The method returns the index of the last occurrence of the specified substring at a position less than or equal to `position`, which defaults to `+Infinity`. If `position` is greater than the length of the calling string, the method searches the entire string. If `position` is less than `0`, the behavior is the same as for `0` — that is, the method looks for the specified substring only at index `0`.
40+
- : The method returns the index of the last occurrence of the specified substring at a position less than or equal to `position`, which defaults to `Infinity`. If `position` is greater than the length of the calling string, the method searches the entire string. If `position` is less than `0`, the behavior is the same as for `0` — that is, the method looks for the specified substring only at index `0`.
4141

4242
- `'hello world hello'.lastIndexOf('world', 4)` returns `-1` — because, while the substring `world` does occurs at index `6`, that position is not less than or equal to `4`.
4343

files/en-us/web/javascript/reference/global_objects/string/match/index.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,17 +135,15 @@ When the `regexp` parameter is a string or a number, it is implicitly converted
135135

136136
```js
137137
const str1 =
138-
"NaN means not a number. Infinity contains -Infinity and +Infinity in JavaScript.";
138+
"All numbers except NaN satisfy <= Infinity and >= -Infinity in JavaScript.";
139139
const str2 =
140140
"My grandfather is 65 years old and My grandmother is 63 years old.";
141141
const str3 = "The contract was declared null and void.";
142142
str1.match("number"); // "number" is a string. returns ["number"]
143143
str1.match(NaN); // the type of NaN is the number. returns ["NaN"]
144144
str1.match(Infinity); // the type of Infinity is the number. returns ["Infinity"]
145-
str1.match(+Infinity); // returns ["Infinity"]
146145
str1.match(-Infinity); // returns ["-Infinity"]
147146
str2.match(65); // returns ["65"]
148-
str2.match(+65); // A number with a positive sign. returns ["65"]
149147
str3.match(null); // returns ["null"]
150148
```
151149

files/en-us/web/javascript/reference/global_objects/string/repeat/index.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ repeat(count)
2828
### Parameters
2929

3030
- `count`
31-
- : An integer between `0` and
32-
{{jsxref("Number/POSITIVE_INFINITY", "+Infinity")}}, indicating the
33-
number of times to repeat the string.
31+
- : An integer between `0` and {{jsxref("Number/POSITIVE_INFINITY", "Infinity")}}, indicating the number of times to repeat the string.
3432

3533
### Return value
3634

0 commit comments

Comments
 (0)