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));