
CodeHS Unit 7 Review

Quiz
•
Computers
•
9th - 12th Grade
•
Easy
Ezhilarasi Kalathy
Used 3+ times
FREE Resource
9 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
We want to make a grocery list in our program. Which of the following is the correct way to make an array/list?
var groceries = ["milk" "sugar" "eggs" "cake"];
var groceries = ["milk, sugar, eggs, cake"];
var groceries = "milk, sugar, eggs, cake";
var groceries = ["milk", "sugar", "eggs", "cake"];
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What method can we use to find the index of a particular element in an array?
.index
indexOf
inIt
findElement
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The index of the very first item in an array is 1.
true
false
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
var numbers = [0, 1, 2, 3, 4];
How can we add a 6 to the end of numbers?
pop(6)
push(6)
add(5,6)
pop( )
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is an array ?
An unordered collection of items
An ordered collection of items
A collection of (key, value) pairs
A collection of unique objects that are not in a specific order
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following program?
function start(){
var arr = [1, 2, 3, 4, 5, 6, 7];
var elem = arr.remove(2);
println(arr);
}
[1, 2, 3, 4, 5]
[3, 4, 5, 6, 7]
[1, 2, 4, 5, 6, 7]
[1, 3, 4, 5, 6, 7]
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
var numbers = [ 1, 2, 3, 4, 5, 6];
How can we remove the last item from the end of this array and store it in a variable called highestNum?
var highestNum = numbers.pop();
var numbers =
highestNum.push(6);
var highestNum = numbers[5];
var numbers = numbers.pop();
8.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
var shoppingList = ["milk", "eggs", "sugar", "bread", "cake"];
Which line of code will correctly change "cake" to "apples"?
shoppingList["apples"] = "cake";
shoppingList[5] = "apples";
shoppingList["cake"] = "apples";
shoppingList[4] = "apples";
9.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the index of the first element in an array?
1
-1
2
0
Similar Resources on Wayground
10 questions
Arrays and Lists

Quiz
•
6th - 12th Grade
13 questions
Arrays in Swift

Quiz
•
10th - 12th Grade
13 questions
Dojo - Type Inference

Quiz
•
1st - 12th Grade
9 questions
Unit 5 -- Lists, Loops, Traversals

Quiz
•
9th - 12th Grade
10 questions
Arrays Javascript (CodeCademy)

Quiz
•
9th - 12th Grade
11 questions
JS Certification

Quiz
•
12th Grade
12 questions
Javascript Arrays

Quiz
•
9th - 12th Grade
10 questions
Arrays

Quiz
•
10th - 12th Grade
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
Discover more resources for Computers
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
40 questions
LSHS Student Handbook Review: Pages 7-9

Quiz
•
11th Grade
24 questions
Scientific method and variables review

Quiz
•
9th Grade
10 questions
Characteristics of Life

Quiz
•
9th - 10th Grade
19 questions
Mental Health Vocabulary Pre-test

Quiz
•
9th Grade