You are a creating a web page with a script.
The script will insert the window's location inside the page's input element.
Sort the elements bellow according to the order in the script:
JS Practice
Quiz
•
Computers
•
12th Grade
•
Medium
Nixon López
Used 6+ times
FREE Resource
17 questions
Show all answers
1.
REORDER QUESTION
1 min • 2 pts
You are a creating a web page with a script.
The script will insert the window's location inside the page's input element.
Sort the elements bellow according to the order in the script:
document.
getElementById('url').
value =
window.location
.href
Answer explanation
This code creates a web page with an input field that displays the URL of the current page when loaded in a web browser.
2.
REORDER QUESTION
1 min • 2 pts
A JavaScript array is initialized as follows:
var array=[20,40,60,80];
You write the following code to manipulate the array:
array.shift();
array.pop();
array.push(10);
array.unshift(100);
Sort the final result of the array by dragging the elements:
100
40
60
10
3.
LABELLING QUESTION
1 min • 2 pts
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?
Drag the elements to the correct position according to the statement.
break
do
while
continue
for
4.
DROPDOWN QUESTION
1 min • 2 pts
Evaluate the following code. Line numbers are included for reference only.
var n = 50;
var c = n + 5;
var a = n % 2;
var d = c / 11;
n = d * 2;
console.log (n, c, a, d);
(a)
What is the console result of the variables n,c,a,d?
Choose the correct option.
5.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
totalscore is in the correct format according to standard naming conventions for JavaScript
Yes
No
6.
LABELLING QUESTION
1 min • 2 pts
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 "Welcome!".
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.
onmousedown
onmouseover
onkeydown
onclick
onmouseout
7.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Form POST requests will always remain in the browser history.
Yes
No
Answer explanation
POST requests do not appear in the browser history as a unique URL, since the submitted data is not in the URL but in the body of the request. However, the page to which the form is submitted may appear in the browser history.
20 questions
System Admin Linux Ch 14 Quiz Review
Quiz
•
9th - 12th Grade
15 questions
Javascript
Quiz
•
10th - 12th Grade
15 questions
JavaScript Basics
Quiz
•
12th Grade - University
15 questions
Examen Tema 4 Array, Funciones y Objetos JavaScript
Quiz
•
12th Grade
18 questions
Coding District Test Prep Form I
Quiz
•
12th Grade
20 questions
PHP
Quiz
•
12th Grade
15 questions
JS Talks, Quiz #5
Quiz
•
1st - 12th Grade
14 questions
Javascript Starter
Quiz
•
12th Grade
15 questions
Character Analysis
Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
10 questions
American Flag
Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25
Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
20 questions
Taxes
Quiz
•
9th - 12th Grade
17 questions
Parts of Speech
Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression
Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing
Quiz
•
9th - 12th Grade
10 questions
Identifying equations
Quiz
•
KG - University