Friday, May 24, 2013
Link Dir
Download
Resources
Music
Home
IT Quiz Menu
Quizzes Home Page
General Quizzes and Trivia
PC Troubleshooting
Networking Guide
Info Tech Glossary
Code Bank
Web Development
IT Quizzes Category
ASP
ASP 2
ASP ADO
ASP Server Side Include
ASP.NET
C# .NET
CISCO-CCNA
Computer Hardware
Computer Technolgy
Computer Trivia
CSS
Database Management
HTML
IIS 6 Administration
Java
JavaScript
Javascript Fundamental
Linux
MCSE 70-291
Network Plus
Networking
Networking 2
OSI Model
PERL
PHP
Project Management
Search Engine Optimization
Server Administrator
SQL
SQL Advanced
SQL Server Administration
VB.NET
Web Designer
Windows 2000 Server
Windows 2003 Server Adminstration
XHTML
XML
Search Web Link
Search Software
Quizzes Main Page
IT Quizzes
JavaScript 2 Quiz
E-mail this Quiz to a friend
Bookmark this Quiz
JavaScript 2 Quiz
There are 18 questions in this quiz. Good luck!
Passing grade is 70% = C.
1)
Inside which HTML element do we put the JavaScript?
a)
<scripting>
b)
<javascript>
c)
<script>
d)
<js>
2)
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")
3)
How do you call a function named "myFunction"?
a)
call function myFunction
b)
myFunction()
c)
call myFunction()
4)
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
5)
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
6)
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
7)
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++)
8)
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")
9)
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)
10)
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)
11)
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")
12)
How do you put a message in the browser's status bar?
a)
window.status = "put your message here"
b)
statusbar = "put your message here"
c)
status("put your message here")
d)
window.status("put your message here")
13)
How do you find the client's browser name?
a)
browser.name
b)
navigator.appName
c)
client.navName
14)
You define an array using
a)
var myarray = new Array();
b)
var myarray = array new;
c)
var new Array() = myarray;
d)
var new array = myarray;
15)
Onclick is equivalent to which two events in sequence
a)
onmouseover and onmousedown
b)
onmousedown and onmouseout
c)
onmousedown and onmouseup
d)
onmouseup and onmouseout
16)
Whicj best describe void?
a)
A method
b)
A function
c)
An operator
d)
A statement
17)
Which property would you use to redirect visitor to another page?
a)
window.location.href
b)
document.href
c)
java.redirect.url
d)
link.redirect.href
18)
Which of the following JavaScript statements use arrays?
a)
setTimeout("a["+i+"]",1000)
b)
k = a & i
c)
k = a(i)
E-mail this Quiz to a friend
Bookmark this Quiz