KA JS Arrays

KA JS Arrays

KG - University

6 Qs

quiz-placeholder

Similar activities

AP Computer Science

AP Computer Science

12th Grade

10 Qs

Javascript Lists Lecture Knowledge Check

Javascript Lists Lecture Knowledge Check

9th - 12th Grade

11 Qs

Java ArrayLists

Java ArrayLists

10th Grade

11 Qs

JavaScript with Arrays

JavaScript with Arrays

KG - University

6 Qs

Lecture 4.4 Part 2

Lecture 4.4 Part 2

12th Grade

11 Qs

AP Computer Science College Board Test

AP Computer Science College Board Test

12th Grade

10 Qs

AP Computer Science A Classes

AP Computer Science A Classes

12th Grade

10 Qs

AP Computer Science Midterm Review

AP Computer Science Midterm Review

12th Grade

10 Qs

KA JS Arrays

KA JS Arrays

Assessment

Quiz

Computers

KG - University

Hard

Used 156+ times

FREE Resource

6 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of these lines of code show how to validly store an array with 3 items?
var nums = [42, 3, 7];
var nums = 3, 42, 7;
var nums = [3];
var nums = (3, 42, 7);

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

How would you access the second element in an array?
nums.2
nums[2]
nums_1
nums[1]

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

How would you change the first element in an array?
nums[1] = "New!";
nums = "New!";
var nums[1] = "New!";
nums[0] = "New!";

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What property tells you how many items are in an array?
length
count
items
num

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What method can you use to add an element to an array in JavaScript?
pop()
push()
append()
insert()

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of these for loops would iterate through each item of the nums array (no more, no less)?
for (var i = 0; i < nums; i++) { }
for (var i = 1; i < nums.length; i++) { }
for (var i = 1; i < nums; i++) { }
for (var i = 0; i < nums.length; i++) { }