Tránh viết biến có phạm vi global
tipjs,scope,global
Không nên
var map = document.querySelector("#my-map");
map.style.height = "600px";
Nên
!function(){
var map = document.querySelector("#my-map");
map.style.height = "600px";
}()
Có thể bạn đã miss một số snippets code
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
Detect when your site is visible to users
Detect when your site is visible to users
Random String
Random String với độ dài tuỳ chọn
Getting the last element of a split string array
Getting the last element of a split string array
try/catch es10
An update for developer convience allows the use of try/catch without an explicit e Error reference in the catch call.