IT/JavaScript1 [JavaScript] this 설명/문제점/해결 방법 예제 확인 1 "This" 자바스크립트 "this"는 어려운 개념이에요. this를 정확하게 알고자 한다면, 정말 많은 개념들을 숙지하고 있어야 합니다. ex) binding, arrow function, lexical scope, context 등등.. 하지만 우리는 this가 왜 있으면 좋은 지부터 짚어 볼게요. 차근차근 하나씩 예제를 통해서 보겠습니다. 첫 데이트를 할 때, 비싼 외제차를 사주지 않으니까요 :) 1) 문제점 let contact = { firstName: "frank", printName : function(){ // console.log(firstName); // firstName is not defined console.log(contact.firstName); } } contact.print.. 2020. 9. 26. prev 1 next