CodingTrain / CodingTrain/Suggestion-Box
More on arrays in JS
Open
- Dominant language
- No language data
- Stars
- 570
- Forks
- 85
- PR merge metrics
- No merged PRs in 30d
Description
Following up from 2D array video #46, this interesting solution was pointed out to me in the YouTube comments:
``` javascript
make2Darr = function(r, c) {
return new Array(c).fill([]).map(e => new Array(r));
}
```
Would love to investigate `fill()` and `map()` in a future video. What else? There is also #89 which relates to this topic.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.