Async await in javascript

async,tipjs,function

const fs = require('fs')
async function readFile() {
  try {    
    var f1 = await readFileWithPromise('/etc/passwd')
    console.log(f1.toString())
    var f2 = await readFileWithPromise('/etc/profile')
    console.log(f2.toString())
  } catch (err) {
    console.log(err)
  }
}

Có thể bạn đã miss một số snippets code

Await in a for loop

How to Await in a for loop

lỗi access-control-allow-origin và cách khắc phục

lỗi access-control-allow-origin và cách khắc phục trong express, nodejs

Convert Array-like to True Array

Convert Array-like to True Array

How to reverse an Array?

Reversing an array in JS is really simple with the standard array method. Like below

Remove item in array javascript es6

Những bạn nào mà đã sử dụng ES6 một thời gian rồi thì có thể sử dụng method array.filter()