렛츠기릿 자바스크립트

    반응 속도 체크 (self) -forEach, sort, slice특이사항★★

    추가로 가장 빠른 다섯번의 시도가 몇 초인지 상위 5개만 보여주세요. 6번 이상 시도한 경우에도 상위 5개만 보여주세요 나의풀이 클릭해서 시작하세요 강사풀이 클릭해서 시작하세요 slice() 특이사항 array=[1, 2, 3] array.slice(0, 5) 인 경우 여전히 array=[1, 2, 3] 이다. 오류가 발생하지 않는다.★★

    반응 속도 체크

    반응 속도 체크 - 1단계 클릭해서 시작하세요 반응 속도 체크 - 2단계(시작시간, 끝시간) 클릭해서 시작하세요 반응 속도 체크 - 3단계 클릭해서 시작하세요 요약정리 반응 속도 테스트 태그.className →클래스를 선택한다. 태그.classList.contains('클래스') → waiting클래스가 존재하는지 확인 태그.classList.add('클래스'); //추가 태그.classList.replace('기존클래스' , '수정클래스'); //수정 태그.classList.remove('클래스'); //제거 현재 시간 new Date() 자바스크립트에서는 0이 1월이고, 1이 2월이다. new Date().getFullYear() new Date().getMonth() new Date().getDa..

    가위 바위 보 (3선승제)

    html파일 가위 바위 보 0 rsp.png파일 script파일 const $computer = document.querySelector("#computer"); const $score = document.querySelector("#score"); const $rock = document.querySelector("#rock"); const $scissors = document.querySelector("#scissors"); const $paper = document.querySelector("#paper"); const IMG_URL = "./rsp.png"; $computer.style.background = `url(${IMG_URL}) -464px 0`; $computer.style.backg..

    로또 등수 매기기 (self)

    HTML파일 추첨 결과는? 보너스: 띄어쓰기단위로 숫자 7개를 입력해주세요 입력 style.css파일 .ball { display: inline-block; border: 1px solid black; border-radius: 20px; width: 40px; height: 40px; line-height: 40px; font-size: 20px; text-align: center; margin-right: 20px; } script파일 const $startBtn = document.querySelector("#startBtn"); $startBtn.addEventListener("click", () => { start(); }); const start = function () { const $log..