JavaScript

Function 객체의 Methods 소개

jungtae17 2015. 11. 23. 14:46

1. Function.prototype.apply()

  : 함수를 호출하는데 this 값을 지정된 객체로 대체하고 매개변수를 배열로 전달 한다.

apply([thisObj[,argArray]])


2. Function.prototype.call()

  : 함수를 호출하는데 this 값을 지정된 객체로 대체하고 매개변수를 순서대로 전달 한다.

call([thisObj[,arg1[,arg2[,..,argN]]]])


3. Function.prototype.bind()

  : this 값이 지정된 함수를 생성하며, 초기 매개 변수를 지정 할 수 있다.

function.bind(thisArg[,arg1[,arg2[,...,argN]]])