Operators Types Boolean Arrays Maps Objects Regular Expressions Popup Boxes Events Template literals (a.k.a. template strings)
console.log(`Current value is ${value}`)


nullish coalescing operator (??)
The nullish coalescing operator (??) is a logical operator that returns its right-hand side operand when its left-hand side operand is null or undefined, and otherwise returns its left-hand side operand.
This can be contrasted with the logical OR (||) operator, which returns the right-hand side operand if the left operand is any falsy value, not only null or undefined. In other words, if you use || to provide some default value to another variable foo, you may encounter unexpected behaviours if you consider some falsy values as usable (e.g., '' or 0).

optional chaining operator (?.)
The optional chaining operator (?.) functions similarly to the . chaining operator, except that instead of causing an error if a reference is nullish (null or undefined), the expression short-circuits with a return value of undefined. When used with function calls, it returns undefined if the given function does not exist.
myVar.myFunc?.()
myVar.myArray?.[0]

Styling console output
You can use the %c directive to apply a CSS style to console output:
console.log("This is %cMy stylish message", "color: yellow; font-style: italic; background-color: blue;padding: 2px");

Declaring properties with a variable of the same name
const firstName = "John";
const lastName = "Doe";
const person = {
    firstName: firstName,
    lastName: lastName
};
can be written
const person = {
    firstName,
    lastName
};

script’s defer and async
<script src="sample.js" defer></script>