Which of the following comparison statement will return true? A) X=10; Y=11; y--; x==y B) X=10; Y=11; Y++; x==y’ C) X=11; Y=10; y--; x==y; D) X=11; Y=10; y-= 1; x==y
A.
Option A
B.
Option B
C.
Option C
D.
Option D
Answer:
D
User Votes:
A
50%
B
50%
C
50%
D
50%
Discussions
0/ 1000
Question 2
Which of the following will correctly declare the courseNumber variable as a siring data type?
B.
var courseNumber = ''JS101'';
C.
var_courseNumber = JS101'';
D.
var courseNumber = JS101;
Answer:
C
User Votes:
B
50%
C
50%
D
50%
Discussions
0/ 1000
Question 3
Geraldine is creating a custom object to store user account data on her Web site. She has written the following code it is not working properly. What change should she make to enable the script to run correctly?
A.
She must remove the this keyword from the left side of the assignment variables
B.
She must add the parameters username. password and email to the function definition
C.
She must change the this keyword to the object keyword on the left side of the assignment variables
D.
She must change the function keyword to the object keyword in the function definition
Answer:
A
User Votes:
A
50%
B
50%
C
50%
D
50%
Discussions
0/ 1000
Question 4
Considering the following code: Var 1 ; For (I = 1; I < 10; I ++) What part of the code fragment initializes the counter variable?
A.
i ++
B.
i < 10;
C.
i = 1;
D.
Var 1;
Answer:
C
User Votes:
A
50%
B
50%
C
50%
D
50%
Discussions
0/ 1000
Question 5
What basis code is needed to define the JavaScript function avgGrades?
A.
Function avgGrades () {}
B.
avgGrades function ()
C.
avgGrades (){ }
D.
var = function avgGrades () {}
Answer:
C
User Votes:
A
50%
B
50%
C
50%
D
50%
Discussions
0/ 1000
Question 6
Which of the following best describes how JavaScript communicates with databases when used with AJAX?
A.
It provides a limited set of database operations such as retrieving data and displaying it back to the originating Web page.
B.
It performs back-end database operations such as modifying the database schema.
C.
It is used to change database security permissions.
D.
It was designed to perform queries on databases.
Answer:
D
User Votes:
A
50%
B
50%
C
50%
D
50%
Discussions
0/ 1000
Question 7
Consider the following two code segments: Which of the following is true about these code segments?
A.
The code in both segments will cause an infinite loop
B.
The code in Segment 2 will execute one time
C.
The code in both segments will not execute at all
D.
The code in Segment 1 will execute one time
Answer:
D
User Votes:
A
50%
B
50%
C
50%
D
50%
Discussions
0/ 1000
Question 8
Consider the following code: What is the result of running this script in a Web browser?
A.
Hannah Lana.Franna.Diana
B.
Diana Franna Hannah Lana
C.
Hannah Diana Franna Lana
D.
Diana Franna Lana Hannah
Answer:
B
User Votes:
A
50%
B
50%
C
50%
D
50%
Discussions
0/ 1000
Question 9
Consider the following code: <img onmousout=” sofaPic (this) “ src=”sofa.jpg” alt=”sofa”> Which of the following is true based on the above code?
A.
The function sofaPic will be called upon when sofaPic image loads
B.
The function sofaPic is called when the image fails to load
C.
The function sofaPic is called when the mouse pointer moves off the image
D.
The function sofaPic is called when the mouse pointer moves over the image
Answer:
B
User Votes:
A
50%
B
50%
C
50%
D
50%
Discussions
0/ 1000
Question 10
Which of the following comparison statements will return true? A. X = 15 ; Y = 3 ; X == y ; B. X=15 Y=3; X +==45; C. X = 15 Y = 3; X ! == y; D. X = 15 Y = 3 X === y;
Answer:
C
User Votes:
Discussions
0/ 1000
Question 11
How does AJAX use the XMLHttpRequest object"?
A.
It changes a portion of a Web page so only the affected part of the page will be reloaded
B.
It provides Web page compatibility with mobile device browsers
C.
It performs code validation on the server-side in order to speed up the process of validation
D.
It provides backward-compatibility with older browser versions
Answer:
B
User Votes:
A
50%
B
50%
C
50%
D
50%
Discussions
0/ 1000
Question 12
What is the expected result when executing the following scripts in a web browser?
A.
A pop-up alert box will display Fair followed by a pop-up alert box displaying Bad
B.
A pop-up alert box will display Poor
C.
There is an error in the code, no pop-up alert box will appear
D.
Two pop-up alert boxes will appear one will display Fair and one will display Poor
Answer:
A
User Votes:
A
50%
B
50%
C
50%
D
50%
Discussions
0/ 1000
Question 13
Ashton need to write out the items in any array as a list, with their array index number followed by their value. Which block of code will accomplish this? A) B) C) D)
A.
Option A
B.
Option B
C.
Option C
D.
Option D
Answer:
A
User Votes:
A
50%
B
50%
C
50%
D
50%
Discussions
0/ 1000
Question 14
Consider the following code: The JavaScript function above will display the following:
A.
The package will be delivered to P.O. Box 789 Central City Florida 54321 Company headquarters are located in 123 Main Street Anytown Arizona 98765
B.
The package will be delivered to 123 Main Street Anytown Arizona 98765 Company headquarters are located in P.O Box 789 Central City Florida 541321
C.
The package will be delivered to Arizona Company headquarters are located in Florida
D.
The package will be delivered to Florida Company headquarters are located in Arizona
Answer:
A
User Votes:
A
50%
B
50%
C
50%
D
50%
Discussions
0/ 1000
Question 15
Consider the following code: What change should be made to ensure that it correctly displays the value of name in all uppercase letters?
A.
Line 2 should be changed to name = name . toUpperCase () ;
B.
Line 2 should be changed to name .prototype . toUpperCase () ;
C.
Line 3 should be changed to document. write (NAME) :
D.
Line 1 should be changed to var name = new sting("Jaccb");