logo

Best Practices

Declare Objects and Arrays with const

Use Parameter Defaults

camelCase Variable Names

Use Asynchronous methods when possible

Initialize Variables

Prefer Destructuring

JavaScript : Examples
How to use Async and Await

Sometimes you need to deal with a Promise Asynchronously. Making a function Asynchronous requires adding 'async' to it. Making a function wait for a promise requires adding 'await to it.

Please Login or Register to comment