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
Sử dụng reduce và concat làm phẳng một array
Array.reduce() và Array.concat() có thể giúp chúng ta làm phẳng một Array như:
How to reverse an Array?
Reversing an array in JS is really simple with the standard array method. Like below
Sự khác biệt giữa substr và substring
Sự khác biệt giữa substr() và substring() chức năng trong JS là gì?
Đế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
JavaScript: async/await with forEach
JavaScript: async/await with forEach()