HOTSPOT
You are designing a web page that contains a blue button. When the button is pressed, it should call a function that displays the message elcome When the cursor hovers over the button, the button should turn red. When the cursor
leaves the button, the button should revert back to its original color of blue.
You want to complete the markup using the appropriate HTML events.
How should you complete the markup? To answer, select the appropriate event in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:
HOTSPOT
You evaluate the following code:
You need to determine the values of sampleStudent, sampleCourse.name, and sampleCourse.grade that are output by console.log(). What are the final values for the three variables? To answer, select the appropriate values in the answer area.
Hot Area:
HOTSPOT
You need to evaluate the following code segment. Line numbers are included for reference only.
Use the drop-down menus to select the answer choice that answers each question based on the information presented in the code segment.
Hot Area:
HOTSPOT
You are creating JavaScript code that manipulates dates. You want to initialize a Date object with the date January 1, 2017 by using the year, month, and date parameters.
How should you complete the code? To answer, select the appropriate code segment in the answer area.
Hot Area:
HOTSPOT
You are creating a function that does safe division.
The function has the following requirements:
The function receives two parameters for the numerator and denominator.
If the denominator is zero, the function must return false.
If the denominator is not zero, the function must return true.
You write the following code. Line numbers are included for reference only.
For each of the following statements, select Yes if the statement is true. Otherwise, select No. NOTE: Each correct selection is worth one point.
Hot Area:
DRAG DROP You are creating a web page with a script. The script will insert the window's location inside the page's input element. How should you complete the code? To answer, drag the appropriate code segment to the correct locations. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to
view content.
Select and Place:
DRAG DROP
You are creating a web page that requests a username.
You create the following HTML form:
You need to write a function that retrieves the username from the form.
How should you complete the code? To answer, drag the appropriate code segments to the correct locations. Each function may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view
content.
NOTE: Each correct selection is worth one point.
Select and Place:
DRAG DROP
You are using JavaScript to create a calculator.
You create the following HTML. Line numbers are included for reference only.
You must create a function named add() that adds the values in the a and b input elements and displays the result in the result input element.
You define the following function in JavaScript:
function add() {
}
You need to complete the body of the function.
Which three code segments should you use to develop the solution? To answer, move the appropriate code segments from the list of code segments to the answer area and arrange them in the correct order.
NOTE: Each correct selection is worth one point.
Select and Place:
DRAG DROP
You need to write a loop that will traverse the length of an array to find the value orange. If an array element value is null, the code should immediately go to the next element. When the value is found, the loop should exit.
How should you complete the code? To answer, drag appropriate keywords to the correct locations. Each keyword may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
Select and Place:
You are creating a web page that allows customers to choose how hot their spice is. If they choose spicy, a warning should be displayed. You create the following form. Line numbers are included for reference only.
You create the following JavaScript code to display the warning.
When you choose spicy and click Order, the warning fails to display.
You need to solve this problem.
What should you do?
A. Change line 07 to
B. Change line 07 to
C. Change line 10 to var option.value = document.forms.orderForm["heatIndex"];
D. Change line 10 to var option = document.forms.orderForm["heatIndex"].value;