1-
|
What is the correct JavaScript syntax to write "Hello World"?
|
|
A -
|
response.write("Hello World")
|
|
B -
|
document.write("Hello World")
|
|
C -
|
("Hello World")
|
|
D -
|
echo("Hello World")
|
2-
|
How do you call a function named "myFunction"?
|
|
A -
|
call function myFunction
|
|
B -
|
myFunction()
|
|
C -
|
call myFunction()
|
|
D -
|
exec function myFunction
|
3-
|
How do you write a conditional statement for executing some statements only if "i" is equal to 5?
|
|
A -
|
if i==5 then
|
|
B -
|
if i=5 then
|
|
C -
|
if (i==5)
|
|
D -
|
if i=5
|
4-
|
How do you write a conditional statement for executing some statements only if "i" is NOT equal to 5?
|
|
A -
|
if (i <> 5)
|
|
B -
|
if (i != 5)
|
|
C -
|
if =! 5 then
|
|
D -
|
if <> 5
|
5-
|
How many different kind of loops are there in JavaScript?
|
|
A -
|
Two. The "for" loop and the "while" loop
|
|
B -
|
Four. The "for" loop, the "while" loop, the "do...while" loop, and the "loop...until" loop
|
|
C -
|
One. The "for" loop
|
|
D -
|
None of the above
|
6-
|
How does a "for" loop start?
|
|
A -
|
for (i = 0; i <= 5)
|
|
B -
|
for (i = 0; i <= 5; i++)
|
|
C -
|
for i = 1 to 5
|
|
D -
|
for (i <= 5; i++)
|
7-
|
What is the correct way to write a JavaScript array?
|
|
A -
|
var txt = new Array(1:"tim",2:"shaq",3:"kobe")
|
|
B -
|
var txt = new Array="tim","shaq","kobe"
|
|
C -
|
var txt = new Array("tim","shaq","kobe")
|
|
D -
|
All of the above are incorrect
|
8-
|
How do you round the number 8.25, to the nearest whole number?
|
|
A -
|
Math.rnd(8.25)
|
|
B -
|
Math.round(8.25)
|
|
C -
|
round(8.25)
|
|
D -
|
rnd(8.25)
|
9-
|
How do you find the largest number of 6 and 8?
|
|
A -
|
Math.max(6,8)
|
|
B -
|
top(6,8)
|
|
C -
|
ceil(6,8)
|
|
D -
|
Math.ceil(6,8)
|
10-
|
What is the correct JavaScript syntax for opening a new window called "window5" ?
|
|
A -
|
new("http://www.ex-designz.net","window5")
|
|
B -
|
window.open("http://www.ex-designz.net","window5")
|
|
C -
|
open.newwindow("http://www.ex-designz.net","window5")
|
|
D -
|
new.window("http://www.ex-designz.net","window5")
|