We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8c29267 commit 76ef555Copy full SHA for 76ef555
README.md
@@ -2458,6 +2458,23 @@ function mostCommonWord(inputString) {
2458
return mostCommonWord;
2459
}
2460
```
2461
+### Creating array with ascending integers
2462
+You can use `Array.from()` to map, if you provide a mapping function as its second parameter.
2463
+```
2464
+Array.from(new Array(3), (x, i) => i)
2465
+// [ 0, 1, 2 ]
2466
2467
+Creating an arbitrary range of integers:
2468
2469
+const START = 2, END = 5;
2470
+Array.from(new Array(END - START), (x, i) => i + START)
2471
+// [ 2, 3, 4 ]
2472
2473
+Another way of creating an Array with ascending integers is via `.keys()`, which also treats holes as if they were `undefined` elements:
2474
2475
+[...new Array(3).keys()]
2476
2477
2478
### Brackets match
2479
For the given string, determine if the strings of brackets in the input is valid or invalid by these criteria.
2480
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments