Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Node v7.5.0 Released. Parent comment
async getDoc(doc) {
const result = await db.get(doc) console.log('result:', result)
// instead of:
function getDoc(doc) {
db.get(doc, result => { console.log('result:', result) });
// or
db.get(doc) .then(result => 'result: ' + result) .then(::console.log) .catch(::console.error) }
There are no comments on this comment yet.
async getDoc(doc) {
}// instead of:
function getDoc(doc) {
}// or
function getDoc(doc) {