인프런 영문 브랜드 로고
인프런 영문 브랜드 로고

Inflearn Community Q&A

whddbs3115436's profile image
whddbs3115436

asked

ES6 course for modern javascript development

실습 예제2 제가 쓴 답안 입니다.

Written on

·

158

0

        const SETTING = {
            name : "LUCKY LOTTO",
            count : 6,
            maxNumber : 45
        };
        
        function getRandomNumber({maxNumbercount}){ // 파라미터에서 Destructuring
            const lottoSet = new Set();
            for(; lottoSet.size < count;){
                lottoSet.addMath.floor( (maxNumber-1) * Math.random() ) + 1 );
            }
            return lottoSet;
       }
console.log(getRandomNumber(SETTING));
javascriptes6

Answer

This question is waiting for answers
Be the first to answer!
whddbs3115436's profile image
whddbs3115436

asked

Ask a question