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
Lấy ngày hiện tại trong javascript
Lấy ngày hiện tại trong javascript
Await in a for loop
How to Await in a for loop
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.
Spread Operator for Objects
Using the spread operator during an Object declaration will assign the properties of the referenced Object to the new Object.