String.prototype.trimEnd

es10,function

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.

let pingan8787 = '   Hello pingan8787!   ';
console.log(pingan8787);        // "   Hello pingan8787!   ";
console.log(pingan8787.length); // 23;

console.log(pingan8787.trimEnd());        // "   Hello pingan8787!";
console.log(pingan8787.trimEnd().length); // 20;

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

Remove array of objects from another array of objects

Remove array of objects from another array of objects

String.prototype.trimStart

trimStart() 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à trimStart() xoá những ký tự space bên trá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.

Object.keys và Object.getOwnPropertyNames

Object.keys và Object.getOwnPropertyNames

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.