숫자 범위만큼 map 돌리기
지정된 숫자 범위만큼 map을 돌리고 싶다면
1
[...Array(n).keys()].map;
혹은
1
Array.from(Array(n).keys());
숫자만큼 배열을 만들어 map을 돌린다.
How to generate range of numbers from 0 to n in ES2015 only?
This post is licensed under CC BY 4.0 by the author.
지정된 숫자 범위만큼 map을 돌리고 싶다면
1
[...Array(n).keys()].map;
혹은
1
Array.from(Array(n).keys());
숫자만큼 배열을 만들어 map을 돌린다.
How to generate range of numbers from 0 to n in ES2015 only?