
项目里定义了这么一个函数: test = function (one, two, three, four, five, six){}里面有六个参数。
然后调用的时候 test(one,two,function(){}.function(){},true){}只有两个对应的参数,然后是两个函数,最后一个 true 怎么理解这里面的函数,还有最后一个 true 呢
1 mcfog 2016-12-28 15:42:45 +08:00 via Android 我不理解你不理解什么 |
3 Sivan 2016-12-28 15:48:48 +08:00 @raighne 后面的两个函数和 true 分别对应 three , four , five 。你的调用里 six 是 undefined 。 |
4 Jeepeng 2016-12-28 15:49:33 +08:00 One=one two=two three = function(){} four=function(){} five=true six=undefined |
5 learnshare 2016-12-28 16:07:33 +08:00 |
6 xcatliu 2016-12-28 16:08:58 +08:00 函数可以作为参数传递,也可以作为返回值。 |