在Chrome 55下测试,可用。
1.数组的includes
[‘a‘,‘b‘].includes(‘a‘) // true
[‘a‘,‘b‘].includes(‘c‘) // false
2.Math.pow(x,y)可以简写成 x**y
Math.pow(3,3) // 27
3**3 //27
3.async和await可以试用了(从chrome 55开始)
async function fetchJson(url) { try { let request = await fetch(url); let text = await request.text(); return JSON.parse(text); } catch (error) { console.log(`ERROR: ${error.stack}`); } }
原文:http://www.cnblogs.com/easyc/p/6431975.html