Numeric separator

Chrome Stable에 추가된 기능

cosnt num1 = 100000000000000000000000n

const num2 = 10_000_000_000_000_000_000_000_000_000

읽기 쉽다. 두 개의 _를 연속으로 넣을 수는 없다.

Intl Stuff

다국어 처리와 관련 되어 있다.

const rtf = new Intl.RelativeTimeFormat('en');
rtf.format(3.14, 'second');
// in 3.14 seconds
rtf.format(-15, 'minute');
// 15 minutes ago

matchAll

정규식으로 match를 실행 할 때 모든 조각을 얻을 수 있다.

Class field

class Whatever {
	constructor() {
		this.foo = 'bar';
	}
}

// ...

class Whatever {
	foo = 'bar';
}

Native lazy loading

<img src="image.webp" loading="lazy" />