강의

멘토링

커뮤니티

Inflearn Community Q&A

pokow1144's profile image
pokow1144

asked

Learn Javascript ES6+ properly - Beginner

default parameter

default parameter TDZ

Written on

·

269

0

const multiply = function (x = y * 3, y) {

  console.log(x, y)

}

multiply(2, 3)

multiply(undefined, 2) <- 이 부분에서

reference error 가 나는 이유를 모르곘습니다

es6javascript

Answer 1

0

jaenam님의 프로필 이미지
jaenam
Instructor

해당 영상(https://www.inflearn.com/course/ecmascript-6-flow/lecture/12463)의

4:08 ~ 6:20 부분을 참고하세요.

특히 5:51 이후에서 질문주신 내용과 동일한 현상을 다루고 있습니다.

pokow1144's profile image
pokow1144

asked

Ask a question