Consider the following code:
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
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
Kirken needs to write a script to construct custom objects that store user account information such as a username. password and e-mail address for a Web site. What should he add to the following code to set these properties?
A. Option A
B. Option B
C. Option C
D. Option D
What is the best practice for testing code to pinpoint a logic error within a script?
A. Test the code in the W3C code validator.
B. Conduct a manual, line-by-line, code review.
C. Check for console errors when loading the page.
D. Insert watchpoints and comment out code blocks.
Consider the following code:
What text will display in the alert dialog box?
A. Ear J
B. Ar Jo
C. Ear Jo
D. Ar J
Jaime needs to write a script to remove all the non-digit characters from a phone number so that all that remains are the numbers She knows that she will need to use a regular expression to search for non-digit characters and can use a method to remove all the non- digit characters. Which code should she use?
A. Option A
B. Option B
C. Option C
D. Option D
Which of the following will correctly declare the courseNumber variable as a siring data type?
A. var courseNumber = ''JS101'';
B. var courseNumber = ''JS101'';
C. var_courseNumber = JS101'';
D. var courseNumber = JS101;
Which of the following is not a benefit of Web APIs?
A. Web APIs are frameworks that make it easy to build applications over HTTP services that are accessible over a large range of clients.
B. Web APIs provide an interface for developers to write code themselves instead of using APIs developed by others .
C. Web APIs are best used to create resource-oriented services.
D. Before Web APIs developers had to write the entire code for every task they needed to perform.
Jackson was testing his code when the Web browser became locked and he had to close it to stop the script. What might he have accidentally done when coding his Web site?
A. Coded an infinite loop
B. Coded a frame that breaks the same origin policy
C. Coded an input element that is vulnerable to XSS
D. Coded deprecated HTML
Derrick is building a Web form to collect user data for a retail Web site. He will be collecting the users name e-mail address phone number, physical address and credit card information. What should he do to protect his users, when collecting this data?
A. Notify users how their data is being stored and used on the Web site.
B. Use signed scripts to keep the user data secure on the server.
C. Advise users to install anti-virus software to keep their data secure.
D. Advise users to disable JavaScript in their browsers, to keep information secure.