Newton JS MCQ Quiz
Inside which HTML element do we put the JavaScript?
<script> </script>
<javascript> </javascript>
<scripting> </scripting>
<js> </js>
What is the correct JavaScript syntax to change the content of the HTML element below?
<p id="demo" >This is a demonstration.</p>
document.getElementbyId("demo").innerHTML = "Hello World!";
document.getElementbyName("p").innerHTML = "Hello World!";
#demo.innerHTML = "Hello World!";
document.getElement("p").innerHTML = "Hello World!";
Where is the correct place to insert a JavaScript?
Both the <head> section and <body> section are correct
the <head> Section
the <body> section
None
What is the correct syntax for referring to an external script called "xxx.js"?
<script src = "xxx.js">
<script href = "xxx.js>
<script name = "xxx.js>
<script link ="xxx.js>
How do you write "Hello World" in an alert box?
alertBox("Hello World");
alert("Hello World");
msg("Hello World");
msgBox("Hello World");
Submit Button 🤞