Quiz
Untitled
Create a free account to finish this quiz
Save your progress and see your final score.
Already have an account? Sign in
Questions in this quiz (6)
1Inside which HTML element do we put the JavaScript?
- A<script>
- B<javascript>
2What is the correct JavaScript syntax to change the content of the HTML element below?
<p id="demo">This is a demonstration.</p>- Adocument.getElementById("demo").innerHTML = "Hello World!";
- B#demo.innerHTML = "Hello World!";
- Cdocument.getElement("p").innerHTML = "Hello World!";
- Ddocument.getElementByName("p").innerHTML = "Hello World!";
3Where is the correct place to insert a JavaScript?
- AThe <body> section
- BBoth the <head> section and the <body> section are correct
- CThe <head> section
4What is the correct syntax for referring to an external script called "xxx.js"?
- A<script name="xxx.js">
- B<script href="xxx.js">
- C<script src="xxx.js">
5How to write an IF statement for executing some code if "i" is NOT equal to 5?
- Aif (i != 5)
- Bif (i <> 5)
- Cif i =! 5 then
- Dif i <> 5
6What is the correct way to write a JavaScript array?
- Avar colors = ["red", "green", "blue"]
- Bvar colors = 1 = ("red"), 2 = ("green"), 3 = ("blue")
- Cvar colors = (1:"red", 2:"green", 3:"blue")
- Dvar colors = "red", "green", "blue"
Information
- Description
- Quiz on Untitled, created by Zoran Zorovicevic on 12/01/2021.
- Author
- Zoran Zorovicevic
- Language
- English
- Views
- 0
- Rating
- No ratings yet Rate this quiz