今天发现个async的新用法,之前都是搭配着 promise 让一步函数变得同步,今天试了一下下面的写法 async function hello(){ return "hello world"; } hello().then(data=>{ console.log(data + "哈哈");//h Read More
posted @ 2020-06-21 23:59 古墩古墩 Views(689) Comments(0) Diggs(0) Edit
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
posted @ 2020-06-21 12:32 古墩古墩 Views(1399) Comments(0) Diggs(0) Edit