In Javascript, arrays sort in (a) order by default. The result of the following code:
var x = [3, 45, 1234, 24];
x.sort();
is (b)
Web Development Tutorial 10 Quiz Review
Quiz
•
Computers
•
9th - 12th Grade
•
Medium
Brett Kottmann
Used 3+ times
FREE Resource
20 questions
Show all answers
1.
DRAG AND DROP QUESTION
1 min • 5 pts
In Javascript, arrays sort in (a) order by default. The result of the following code:
var x = [3, 45, 1234, 24];
x.sort();
is (b)
Answer explanation
2.
DROPDOWN QUESTION
45 sec • 5 pts
Increasing the value of the (a) property adds more items to an array, but the items have (b) values until they are defined.
Answer explanation
Changing the value of the length property changes the size of the array.
However, new values must be assigned to those array locations or they will be set to null. (Remember null is different than zero!)
3.
MULTIPLE CHOICE QUESTION
20 sec • 5 pts
By default, items are placed in an array either in the order in which they are defined or explicitly by index number.
True
False
Answer explanation
Javascript will assign variables in order (like when you specify a list of items at creation time) or by index (when you use assignment operators, like x[3] = "apple").
4.
MULTIPLE CHOICE QUESTION
20 sec • 5 pts
Identify a method that inserts new items at the front of an array.
sort()
unshift()
reverse()
assert()
Answer explanation
5.
DRAG AND DROP QUESTION
20 sec • 5 pts
The (a) method extracts array items that match a specified condition.
Answer explanation
6.
MULTIPLE CHOICE QUESTION
45 sec • 5 pts
What values does the variable i take as a result of the following code?
for(var i = 10; i > 0; i--)
9, 8, 7, 6, 5, 4, 3, 2, 1, 0
0, 1, 2, 3, 4, 5, 6, 7, 8, 9
1, 2, 3, 4, 5, 6, 7, 8, 9, 10
10, 9, 8, 7, 6, 5, 4, 3, 2, 1
Answer explanation
7.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
What is the result of x = 15 % 4?
x = 3
x = 4
x = 3.75
% is not a valid operator
Answer explanation
20 questions
W3 PHP Quiz
Quiz
•
11th Grade
15 questions
Алгоритмизация и основы программирования 9А класс
Quiz
•
9th Grade
15 questions
Mảng 1 chiều
Quiz
•
8th - 11th Grade
15 questions
Basic Data Structures - Intro to CS
Quiz
•
12th Grade
17 questions
Массивы в Pascal ABC
Quiz
•
10th Grade
15 questions
Examen Tema 4 Array, Funciones y Objetos JavaScript
Quiz
•
12th Grade
17 questions
Cuestionario de Certificación JS 2024
Quiz
•
12th Grade
25 questions
latihan PHP tahap 2
Quiz
•
11th Grade - University
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