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

Getting the last element of a split string array

Getting the last element of a split string array

Đếm số phần tử trong mảng JavaScript

Đếm số lần xuất hiện của các phần tử trong mảng JavaScript

encode/decode base64 with JS

Encoding to base64 is done with the btoa command

await axios get

await axios get

How to reverse an Array?

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