随笔分类 - javascript
摘要:求并集union: var a = [34, 35, 45, 48, 49]; var b = [48, 55]; var union = [...new Set([...a, ...b])]; console.log(union); 方法二: var array1 = ["Vijendra", "
阅读全文
摘要:先看一个例子●vara={n:1};●varb=a;●a.x=a={n:2};●console.log("a.x:"+a.x);//返回值:a.x:undefined●console.log("a.n:"+a.n);//返回值:a.n:2●console.log("b.x:"+b.x);//返回值:b.x:[objectObject]●console.log("b.n:"+b.n);//返回值:b.n:1要点梳理●Javascript中对象的赋值是引用传递,即变量中存储的是地址而不是值。●Javascript中赋值
阅读全文
摘要:http://ued.ctrip.com/blog/?p=3121我们常用的javascript标签,有两个和性能、js文件下载执行相关的属性:defer和asyncdefer的含义【摘自https://developer.mozilla.org/En/HTML/Element/Script】This Boolean attribute is set to indicate to a browser that the script is meant to be executed after the document has been parsed.async的含义【摘自https://deve
阅读全文

浙公网安备 33010602011771号