摘要:
这个函数的作用是,把数组中的值循环放到回调函数里处理,结果返回一个单一的值。(applies iteratively thecallbackfunction to the elements of thearray, so as to reduce the array to a single va... 阅读全文
摘要:
js中声明一个变量的时候,建议要加上var。如果不加,除非你知道自己在干什么,否则哪天会吃亏哈哈。不加var,js会认为你声明的是全局变量。举个小例子。function test1(){ a =1;}function test2(){ var b =2;}test1();test2(... 阅读全文