자바스크립트를 개발하다 보면 apply와 call을 사용하는 경우가 생깁니다. 1. this 변수에 원하는 값을 할당하고 싶을 때. 2. '파라미터를 담은 배열'을 이용할 때. 하나씩 알아보겠습니다. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 function thisTest() { console.log(this); } thisTest(); thisTest.apply(5); thisTest.call({x:10}); function drawPage() { var str; str = '버튼 클릭' createBtn(); //createBtn.call(this, str); //createBtn.apply(this, [str]); } function creat..