[Bind usage-javascript] .bind()

Darcy Daeseok YU ·2024년 11월 23일

.bind()

function base(...arg){
	console.log(this, ...arg );
} 

const boundBaseFn = base.bind("this instance || null", 1,2,3) 

boundBaseFn() // "this instance || null" , 1 2 3 

result

Mdn Function.prototype.bind

profile
React, React-Native https://darcyu83.netlify.app/

0개의 댓글