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

Random Number javascript

Random Number javascript

Merge Array

How to combine two sorted arrays into one? We can do this easily with the spread operator.

Đế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

flatMap()

Use flatMap() creates a new array with sub-array elements flattened by specified depth.

Lấy ngày hiện tại trong javascript

Lấy ngày hiện tại trong javascript