로또추첨기1 Vanilla JS. 로또 추첨기(while) + 추가ver. for 하라는 공부는 안하고 로또 추첨기를 만들고 있는 내가 레전드 먼저, 버튼을 눌러서 번호가 출력되게 html파일에 기본적인 기능만 세팅을 해줍니다. START 그 다음에 app.js파일에 const start = document.querySelector("#start"); const result = document.querySelector("#result"); start.addEventListener("click", startLotto); start와 result를 불러와서 변수로 설정 한 후에 click 이벤트를 수신하고 startLotto 함수를 트리거하는 start에 이벤트 리스너를 추가합니다. function startLotto() { const lottoNumbers = []; }; startLo.. 2023. 3. 1. 이전 1 다음