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());//3Có thể bạn đã miss một số snippets code
Calculate the number of difference days between two dates
Calculate the number of difference days between two dates
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.
serialize Form
Sử dụng formdata constructor để convert form, FormData, array.from(). Kết hợp window.encodeURIComponent() để encode từng value trong form.
Đếm có bao nhiêu items giống nhau trong một array
reduce javascript. Đếm có bao nhiêu items giống nhau trong một array
using javascript callback style error handling