HTML.CSS.JS/JS 127

[JS] day11_Lotto과제

1~45까지의 중복되지 않는 숫자 6개를 랜덤으로 추출 => 출력 (set 객체를 사용) 랜덤번호 6개 생성 및 출력 당첨번호 7개 생성 및 출력 (마지막 번호는 보너스) 결과 확인 다시하기 " data-ke-type="html">HTML 삽입미리보기할 수 없는 소스    DOCTYPE html>html lang="en">head>    meta charset="UTF-8">    meta http-equiv="X-UA-Compatible" content="IE=edge">    meta name="viewport" content="width=device-width, initial-scale=1.0">    titl..

HTML.CSS.JS/JS 2023.04.18

[JS] day11_classEx (입금, 출금, 송금)

DOCTYPE html> class ex let myAccount = { //이름 name: 'hong', //잔액 balance: 0, //입금 deposit: function(amount){ this.balance += amount; }, //출금 withdraw: function(amount){ this.balance -= amount; }, //이체 transfer: function(amount, otherAccount){ this.balance -= amount; otherAccount.balance += amount; } }; let yourAccount = { //이름 name: 'kim', //잔액 balance: 100, //입금 deposit: function(amount){ this...

HTML.CSS.JS/JS 2023.04.18