interesting js

[‎5/‎3/‎2016 4:18 PM] Calos Chen: 
function a(b,e){var a=0;a+=b;if(e){console.log(b+e);return;} return function(c){a+=c;console.log(a)}} 

output: a(2,3) 5
a(2,3) 5
两种写法结果一样 a(2,3)和a(2)(3)

 

posted @ 2016-05-03 16:32  calochCN  阅读(170)  评论(0编辑  收藏  举报