01. 콜백함수란?

02. 제어권

4-2-1 호출시점

ex) setInterval

var count = 0;
var cbFunc = function () {
	console.log(count);
	if(++count > 4) clearInterval(timer);
}
var timer = setInterval(cbFunc, 300);

4-2-2 인자

ex) Array.prototype.map

var newArr = [10, 20, 30].map(function (currentValue, index){
	console.log(currentValue, index);
	return currentValue + 5;
});
console.log(newArr);
Array.prototype.map(callback[,thisArg])
callback: function(currentValue, index, array)

4-2-3 this

ex) Array.prototype.map