今天发现个async的新用法,之前都是搭配着 promise 让一步函数变得同步,今天试了一下下面的写法 async function hello(){ return "hello world"; } hello().then(data=>{ console.log(data + "哈哈");//h Read More
function generaterArray(min,max,step){ let len = Math.abs(max - min); if(len <= 0) return []; let arr = new Array(len); let cNum = min; let cIndex = 0 Read More