随笔分类 - es
摘要:1. 数组includes()方法,用来判断一个数组是否包含一个指定的值,根据情况,如果包含则返回true,否则返回false。 2. a ** b指数运算符,它与 Math.pow(a, b)相同 简析: 1. includes(), 即indexOf(x) > -1 list.includes(
阅读全文
摘要:async/await: 异步终极解决方案 Object.values() Object.entries() String padding:String.prototype.padStart、String.prototype.padEnd 函数参数列表结尾允许逗号 Object.getOwnProp
阅读全文
摘要:const object1 = { a: 'somestring', b: 42 }; for (const [key, value] of Object.entries(object1)) { console.log(`${key}: ${value}`); } // expected outpu
阅读全文