Optional chaining javascript

es10,tipjs

Optional chaining javascript

Old way:

const street = user.address && user.address.street;

New way with es10

const street = user.address?.streets;

Có thể bạn đã miss một số snippets code

String.prototype.trimEnd

trimEnd() Phương thức xóa khoảng trắng từ đầu chuỗi và trả về một chuỗi mới. Có nghĩa là trimEnd() xoá những ký tự space bên phải mà không làm thay đổi chuỗi gốc.

try/catch es10

An update for developer convience allows the use of try/catch without an explicit e Error reference in the catch call.

nullish coalescing javascript

nullish coalescing javascript

Clone Objects in JavaScript

3 Ways to Clone Objects in JavaScript

Optional chaining javascript

Optional chaining javascript