🔖TAG 💡apply, 💡Arrow, 💡call, 💡hoisting, 💡setTimeout, 💡SPREAD, 💡tagged, 💡Var, 💡비동기, 💡전역변수 📗 Arrowfunction 은 function을 대체하는 신문법이 아님 var 오브젝트1 = { 함수 : function(){ console.log(this) } } 오브젝트1.함수() // 오브젝트1 출력 var 오브젝트2 = { 함수 : () => { console.log(this) } } 오브젝트2.함수() //window 출력 this값은 함수를 만나면 항상 변하는데 arrowfunction 안에서는 변하지 않고 밖에 있던 this를 그대로 쓴다 this & arrow function 연습문제 해설 버튼 변수 신문법 총정리 2. Hoisti..
WEB/JavaScript
2022. 1. 20. 10:54