Detect when your site is visible to users
tipjs,web_developer
document.onvisibilitychange = function () {
document.visibilityState === "visible"
? (document.title = "👋 Hello")
: (document.title = "😟 Bye!");
};Có thể bạn đã miss một số snippets code
10 mẹo sử dụng array và object trong javascript
10 mẹo sử dụng array và object trong javascript
flatMap()
Use flatMap() creates a new array with sub-array elements flattened by specified depth.
await axios get
await axios get
Đế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
Copy a string to the clipboard
Copy a string to the clipboard. Only works as a result of user action (i.e. inside a click event listener).