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());//27Có thể bạn đã miss một số snippets code
snowflake là gì
snowflake là gì? Năm 2010, Twitter có nguồn mở Snowflake, một thuật toán tạo ID duy nhất trên toàn cầu được sử dụng bởi nhóm nội bộ của nó, được dịch thành Snowflake.
Đế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
Hàm lày ngày trong tuần javascript
Hàm lày ngày trong tuần javascript
Spread Operator for Objects
Using the spread operator during an Object declaration will assign the properties of the referenced Object to the new Object.
encode/decode base64 with JS
Encoding to base64 is done with the btoa command