Js Final
Js Final
<javascript>
<scripting>
<script>
<js>
2. What is the correct JavaScript syntax to change the content of the HTML
element below?
Both the <head> section and the <body> section are correct
The <body> section
The <head> section
<script href="xxx.js">
<script src="xxx.js">
<script name="xxx.js">
True
False
6. How do you write "Hello World" in an alert box?
alert("Hello World");
alertBox("Hello World");
msg("Hello World");
msgBox("Hello World");
function = myFunction()
function myFunction()
function:myFunction()
myFunction()
call myFunction()
call function myFunction()
10. How to write an IF statement for executing some code if "i" is NOT equal
to 5?
if (i <> 5)
if i <> 5
if (i != 5)
if i =! 5 then
'This is a comment
//This is a comment
<!--This is a comment-->
14. How to insert a comment that has more than one line?
False
True
v carName;
var carName;
variable carName;
-
=
x
*
No
Yes