[Nullish coalescing operator ??]

let name;
console.log(name || "babo"); // babo

name = "";
console.log(name || "babo"); // babo
// OR 연산자는 falsy 면 값이있어도 무시해버림

console.log(name ?? "babo"); // 0
// nullish 연산자는 undefined , null 일때만 무시

[Optional Chainning ?.]

// Object
const lynn = { name : "lynn" };
console.log(lynn?.profile?.email); // undefined

// Array
let color = ['red', 'green', 'blue'];
console.log(color?.[1]);// green

color = null;
console.log(color?.[1]);// undefined

// Function
let myFunc = () => 'Hello World';
console.log(myFunc?.()); // Hello World

myFunc = null;
console.log(myFunc?.()) // undefined

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/7f8ccb6e-9be3-474d-a0f8-9799d9638a9f/Untitled.png

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/134d13ee-13f0-421e-9714-f6840916f33d/Untitled.png

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/2d18d665-bc06-41b0-bdb0-f0e90df91e32/Untitled.png

[Promise.allSettled]

Promise.all 쓸때

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/d5887718-d881-48d1-aa8f-9f88b388f5d9/Untitled.png

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/b3eb3bde-1977-4baf-b490-dfea92344a85/Untitled.png

Promise.allSettled 쓸때

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/3f25d8a5-1f3b-4286-9caf-e57908920956/Untitled.png

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/e8446b3a-c268-4221-a016-65e6f4433479/Untitled.png