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 do a Promise

Two types of code are "Producing Code" which can take time and "Consuming Code" which waits for a result. Promises are a way of linking these 2 types of code for faster results. This way you can wait for a promise and start to do something else while you wait for the result.

Please Login or Register to comment