[ECMAScript] ES2021

빛트·2022년 7월 14일
0

ECMASCRIPT

목록 보기
8/8
post-thumbnail

numeric separators

let num = 9_000_000;

replaceAll

let str = "h e l l o";
str = str.replaceAll(" ",""); // "hello"

Logical assignment

let val = undefined;
val ??= 'val'; 

Promise.any

Promise.any(([promise1,promise2,promise3])
	.then((result)=>{
	  // 가장 먼저 성공한 프로미스의 결과
	}).catch((e)=>{
  	  // 전부 실패할경우
	}
);

0개의 댓글