文章出處

4. 0 & undefined = 0

 

3.留個坑,react后端渲染

 

2. js中的...擴展運算符可以遍歷所有實現Iterable的對象

  const arr = ['c','d'];

  const arr2=['a', ...arr, 'f']

 

1. promise 實現sleep

async function test() {
  console.log('Hello')
  await sleep(1000)
  console.log('world!')
}

function sleep(ms) {
  return new Promise(resolve => setTimeout(resolve, ms))
}

test();


文章列表


不含病毒。www.avast.com
arrow
arrow
    全站熱搜
    創作者介紹
    創作者 大師兄 的頭像
    大師兄

    IT工程師數位筆記本

    大師兄 發表在 痞客邦 留言(0) 人氣()