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

Await in a for loop

How to Await in a for loop

Làm phẳng mảng dùng phương pháp đệ quy

Làm phẳng mảng dùng phương pháp đệ quy

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).

JavaScript: async/await with forEach

JavaScript: async/await with forEach()

Converting Object to an Array

Converting Object to an Array