should i use document ready function with vanilla js code example
Example: js vanilla dom ready
document.addEventListener("DOMContentLoaded", function() {
// code
});
document.addEventListener("DOMContentLoaded", function() {
// code
});