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

date,tipjs,function

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

const getDay = (fillFlag=true) => {
  const day = new Date().getDate()
  const dayRe = day
  if (fillFlag) day < 10 ? `0${day}` : day
  return dayRe
}

//Ouput:
console.log(getDay());//27

Có thể bạn đã miss một số snippets code

Promise + gì

promise + gì

Remove array of objects from another array of objects

Remove array of objects from another array of objects

await axios get

await axios get

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

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

Ajax, call jQuery POST to node.js expressjs

Ajax, call jQuery POST to node.js expressjs