inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

시작은 프리캠프에서 내장함수 리뷰중 ...

119

kbtusno12

작성한 질문수 8

0

let isStarted = false;


let auth = () => {

if(isStarted === false){
  //타이머가 작동중이 아닐 때 
 isStarted = true
document.getElementById("fisnish").disabled = false
const token = String(Math.floor(Math.random() * 1000000)).padStart(6, "0");
document.getElementById("target").innerText = token;
document.getElementById("target").style.color = "#" + token;
};

let time = 10;

setInterval(function () {
if (time >= 0) {
  let min = Math.floor(time / 60);
  let sec = String(time % 60).padStart(2, "0");
  document.getElementById("timer").innerText = min + ":" + sec;
  time = time - 1;
} else {
  document.getElementById("finish").disabled = true;
  isStarted = false
}
}, 1000);

} else {
  //타이머가 작동중일 때
}
  1. 마지막 타이머가 작동 중일 때
    } else {
    }
    이 부분에서 빨간 줄이 그어져있고 숫자 1이 timer.js1이라고 되어 있어요.

제 눈에는 아무리 찾아봐도 모르겠는데 혹시 코드가 잘 못 된 것이 있나요???

 

  1. 그리고 live server를 통해서 보면 인증번호 전송이 안되는데 뭘 잘못한 걸까요? 여기서 막혀서 못 나가고 있어요 ㅠ

답변 1

0

kbtusno12

뭘 놓쳤는지 영상을 계속 반복하면서 보다가 어디서 잘못됐는지 찾았네요 ~

너무 행복합니다 ^^

 

클로드 이외의 AI와 연결하기

2

49

1

Github repo Front/Backend 분리 이유가 궁금합니다.

1

31

2

찜하기 따닥 문제

1

32

2

블로그 ai 형식으로 적으면 안되나요?

1

39

2