i just want to know that Why the JavaScript is returning an object when i don’t use anything inside script TAG and returns HTML tag when i use defer/async attribute??, the code goes like this
text<h1 id="ele">timer run's here</h1> <button id="btn">Run</button> <script src="functiontest.js" ></script>
enter image description here
enter image description here
i just want to know that Why the JavaScript is returning an object when i don’t use anything inside script TAG and returns HTML tag when i use defer/async attribute??, the code goes like this
text<h1 id="ele">timer run's here</h1> <button id="btn">Run</button> <script src="functiontest.js" defer ></script>
enter image description here
enter image description here
chethan b k is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.