Agreed. I'd add that functions should be named after verbs (or verb phrases) and classes / objects / values after nouns, but I think everyone intuits that anyway.
For variables holding a promise I'll use the gerund (-ing) form of the function which created it:
var gettingInvoices = getInvoices(custId); // returns a Promise
// later...
var invoices = await gettingInvoices;
But it's rare that I would need to do so. I did find that showing this naming convention to someone who was new to Promises helped them avoid situations where they've accidentally made a call block on another's return without needing to.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Agreed. I'd add that functions should be named after verbs (or verb phrases) and classes / objects / values after nouns, but I think everyone intuits that anyway.
For variables holding a promise I'll use the gerund (-ing) form of the function which created it:
But it's rare that I would need to do so. I did find that showing this naming convention to someone who was new to Promises helped them avoid situations where they've accidentally made a call block on another's return without needing to.