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
Converting Object to an Array
Converting Object to an Array
Lấy ngày hiện tại trong javascript
Lấy ngày hiện tại trong javascript
await axios get
await axios get
group by property javascript use reduce
group by property javascript use reduce
flatMap()
Use flatMap() creates a new array with sub-array elements flattened by specified depth.