-
카테고리
-
세부 분야
프로그래밍 언어
-
해결 여부
미해결
풀이가 없어서
20.12.10 17:18 작성 조회수 136
1
const SETTING = {
name: 'lotto',
count: 6,
maxNumber: 45,
lotto : new Set()
}
;(function ({ maxNumber, count, lotto }) {
while(lotto.size < count) {
lotto.add(Math.round(Math.random() * maxNumber));
}
const result = Array.from(lotto).sort((a, b) => a - b);
console.log(result);
}(SETTING));
답변을 작성해보세요.
답변 0