Hàm lày ngày trong tuần javascript

tipjs,date,function

Hàm lày ngày trong tuần javascript

const getWhatDay = () => {
  return new Date().getDay() ? new Date().getDay() : 7
}
console.log(getWhatDay());//3

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.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.

How to reverse an Array?

Reversing an array in JS is really simple with the standard array method. Like below

try/catch es10

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

Getting the last element of a split string array

Getting the last element of a split string array