How do you write "Hello World" in an alert box?
alert("Hello World")
alertBox="Hello World"
alertBox("Hello World")
msgBox("Hello World")
How do you create a function?
function myFunction()
function=myFunction()
function:myFunction()
function myFunction
How do you call a function named "myFunction"?
call myFunction()
call function myFunction
myFunction()
call function myFunction()
How do you write a conditional statement for executing some code if "i" is equal to 5?
if (i==5)
if i=5 then
if i=5
if i==5 then
How do you write a conditional statement for executing some code if "i" is NOT equal to 5?
if =! 5 then
if (i != 5)
if (i <> 5)
if <> 5
How does a "while" loop start?
while (i<=10)
while (i<=10;i++)
while i=1 to 10
while (i=0;i<=10;i++)
How does a "for" loop start?
for (i = 0; i <= 5)
for i = 1 to 5
for (i <= 5; i++)
for (i = 0; i <= 5; i++)
How can you add a comment in a JavaScript?
//This is a comment
'This is a comment
/*This is a comment
What is the correct JavaScript syntax to insert a comment that has more than one line?
//This comment has more than one line//
/This comment has more than one line/
'This comment has more than one line
What is the correct way to write a JavaScript array?
var txt = new Array(1:"tim",2:"kim",3:"jim")
var txt = new Array("tim","kim","jim")
var txt = new Array:1=("tim")2=("kim")3=("jim")
var txt = new Array="tim","kim","jim"