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
try/catch es10
An update for developer convience allows the use of try/catch without an explicit e Error reference in the catch call.
Extend Object javascript
Extend Object javascript
Getting the last element of a split string array
Getting the last element of a split string array
Rolling loading
Nguyên tắc là theo dõi các sự kiện cuộn trang và phân tích mối quan hệ thuộc tính giữa clientHeight , scrollTop và scrollHeight .
Kiểm tra định dạng email bằng Javascript
Kiểm tra định dạng email bằng Javascript