控制台执行下面function getConfig(color,size,otherOptions){ console.log(color,size,otherOptions);
}var defaultConfig = getConfig.bind("#FFF","20*12");
defaultConfig ('123')输出20*12 123 undefined请问输出的20*12 123 undefined是什么原理?为什么下面的语句正常输出function getConfig(color,size,otherOptions){ console.log(color,size,otherOptions);
}var defaultConfig = getConfig.bind(null,"#FFF","20*12");
defaultConfig ('123')输出#FFF 20*12 123.bind第一个参数为null时,后面的参数为什么自动对应getConfig的前两个参数?
添加回答
举报
0/150
提交
取消