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
10 mẹo sử dụng array và object trong javascript
10 mẹo sử dụng array và object trong javascript
Spread Operator for Objects
Using the spread operator during an Object declaration will assign the properties of the referenced Object to the new Object.
Hàm lày ngày trong tuần javascript
Hàm lày ngày trong tuần javascript
Đếm số phần tử trong mảng JavaScript
Đếm số lần xuất hiện của các phần tử trong mảng JavaScript