Javascript Array and Object
Quiz
•
Computers
•
University - Professional Development
•
Practice Problem
•
Hard
Trung Quang
Used 21+ times
FREE Resource
Enhance your content in a minute
9 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Given a number of elements that need to stay in order, would you use an Object or an Array?
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 Wayground
12 questions
Python Quiz 1.4
Quiz
•
University
10 questions
Tree and Planar Graph
Quiz
•
University
10 questions
CodeMonkey for B.Ed IT
Quiz
•
University
10 questions
Android
Quiz
•
University
10 questions
TOOLS FOR AD & TECHNOLOGY DEVELOPMENT (W4-W6)
Quiz
•
University
10 questions
Sosialisasi BRIONE Data
Quiz
•
Professional Development
10 questions
C Programming
Quiz
•
Professional Development
10 questions
Understanding Email, Contacts and Calendaring
Quiz
•
University
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
9 questions
FOREST Community of Caring
Lesson
•
1st - 5th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
14 questions
General Technology Use Quiz
Quiz
•
8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
19 questions
Thanksgiving Trivia
Quiz
•
6th Grade
Discover more resources for Computers
10 questions
Identifying Phishing Emails Quiz
Quiz
•
Professional Development
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
14 questions
2019 Logos
Quiz
•
Professional Development
9 questions
Principles of the United States Constitution
Interactive video
•
University
18 questions
Realidades 2 2A reflexivos
Quiz
•
7th Grade - University
10 questions
Dichotomous Key
Quiz
•
KG - University
25 questions
Integer Operations
Quiz
•
KG - University
