摘要:
<!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="ie=edge" /> <meta name="viewport" content="width=de 阅读全文
摘要:
async function async1() { console.log("async1 start"); await async2(); console.log("async1 end"); } async function async2() { console.log("async2"); } 阅读全文
摘要:
对象(数组)的深克隆和浅克隆(头条) let obj = { a: 100, b: [10, 20, 30], c: { x: 10 }, d: /^\d+$/ }; // 1.浅克隆,obj和obj2是没有关系的,第二级的对象还是引用的同一个地址 let obj2 = { ...obj }; // 阅读全文
摘要:
1 堆;存储引用类型值的空间栈;存储基本类型值和指定代码的环境 // example 1 let a = {}, b = '0', c = 0; a[b] = '珠峰'; a[c] = '培训'; console.log(a[b]); //培训 2 //example 2 let a = {}, 阅读全文