Given a number of elements that need to stay in order, would you use an Object or an Array?
Javascript Array and Object

Quiz
•
Computers
•
University - Professional Development
•
Hard
Trung Quang
Used 21+ times
FREE Resource
9 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Object
Array
2.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Given a collection of artists and lists of their songs, would you store the artist-song-list pairs in an Object or an Array?
Object
Array
3.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
All the elements in an array must be of the same type.
True
False
4.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
All keys in an object are strings.
True
False
Answer explanation
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What happens to the array in the following code snippet?
const dogs = ["Fido", "Odie", "Oscar"];
dogs.length;
dogs.length = 1;
dogs; // What will the array contain here?
Nothing
The array becomes just ["Oscar"]
The array becomes just ["Fido"]
The array becomes just ["Odie", "Oscar"]
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What are the keys in the object after running the code below?
['Prince', 'The Beatles', 'Joni Mitchell', 'Justin Bieber', 'Daft Punk']
['Prince', 'The Beatles', 'Joni Mitchell', 'Justin Bieber']
['Prince', 'The Beatles', 'Joni Mitchell']
['Prince', 'The Beatles', 'Joni Mitchell', 'Daft Punk']
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If we run artistsAndSongs['Daft Punk'].push("Around the World") after running the code below, what is the value of the object?
8.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is the result of the following code in a browser that supports the spread operator?
const oneTwoThree = [1, 2, 3];
const sevenEightNine = [7, 8, 9];
[4, 5, 6, ...oneTwoThree, ...sevenEightNine];
[4, 5, 6, 7, 8, 9, 1, 2, 3]
[4, 5, 6, 1, 2, 3, 7, 8, 9]
[1, 2, 3, 4, 5, 6, 7, 8, 9]
Error
9.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Given the array const letters = ["alpha", "gamma", "delta"], which operation(s) return the array ["alpha", "beta", "gamma", "delta"]?
letters.push("beta")
letters.unshift('beta')
[...letters.slice(0, 1), 'beta', ...letters.slice(1)]
letters.splice(1, 1, 'beta')
letters.splice(1, 0, 'beta')
Similar Resources on Quizizz
10 questions
Data Structure Recap PART1

Quiz
•
University
10 questions
SS2425 WMAD S6+L17 Quiz Time

Quiz
•
University
10 questions
JS- Quiz 1

Quiz
•
University
10 questions
IOTA : Web Development Bootcamp Quiz 3

Quiz
•
University
10 questions
React and Hooks

Quiz
•
Professional Development
13 questions
Тест по PHP с 1 по 4 лекции

Quiz
•
University
10 questions
Java Static

Quiz
•
University
10 questions
Java Arrays

Quiz
•
University
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions

Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines

Quiz
•
Professional Development
12 questions
Dividing Fractions

Quiz
•
6th Grade