- var declarations are globally scoped or function scoped while let and const are block scoped.
- var variables can be updated and re-declared within its scope; let variables can be updated but not re-declared; const variables can neither be updated nor re-declared.
- They are all hoisted to the top of their scope but while var variables are initialized with undefined, let and const variables are not initialized.
- While var and let can be declared without being initialized, const must be initialized during declaration.
- In JavaScript, function parameters default to undefined. However, it's often useful to set a different default value. This is where default parameters can help.
- Default function parameters allow named parameters to be initialized with default values if no value or undefined is passed.
- Template literals are enclosed by the backtick (``) (grave accent) character instead of double or single quotes.
- Arrow functions were introduced in ES6.
- Arrow functions allow us to write shorter function syntax.
- Expanding Arrays
- Combining Arrays
- Copying Arrays and Objects
- https://stackabuse.com/spread-operator-in-javascript/
There are three concepts in Object-Oriented Programming Object, Class and Methods. The ES6 JavaScript supports the Object-Oriented programming components.
- Object: A real-time object entity means the presentation of any entity in real-time.
- Class: It is the before the plan of creating any objects which are known as blueprint of any objects which you want to create.
- Methods: It communicates between the objects.
- https://medium.com/@luke_smaki/javascript-es6-classes-8a34b0a6720a
- shorturl.at/rwzZ3
- https://js.zonayed.me/es6/466
- In JavaScript, undefined means a variable has been declared but has not yet been assigned a value.
- null is an assignment value. It can be assigned to a variable as a representation of no value.
- undefined is a type itself (undefined) while null is an object.
- == check the value only
- === check the value and type