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ư:

Callback in javascript

Callback in javascript

await axios get

await axios get

Kiểm tra định dạng email bằng Javascript

Kiểm tra định dạng email bằng Javascript

try/catch es10

An update for developer convience allows the use of try/catch without an explicit e Error reference in the catch call.