JS-bind, call method

운명애·2020년 11월 17일
0

JS

목록 보기
1/4

// bind, call method; Super important to know the differneces;
// call method calls function manually determining this keyword
// bind method actually creates a new function setting this keyword (null can be set)
// bind method can be used for partial ~ (certain parameters are set at default)
// Understand bind method clearly!
// When you work with addEventListener, a default this keyword points to the tag to which the eventlistener is going to be attached
// With bind method, dealing with callback functions in the event-listener can be easier. Keep it mind!

profile
개발자 하고 싶어요..

0개의 댓글