KA JS Arrays

KA JS Arrays

KG - University

6 Qs

quiz-placeholder

Similar activities

Array

Array

3rd Grade

8 Qs

Описание массива

Описание массива

9th - 10th Grade

10 Qs

Sintaxis Básica de JavaScript

Sintaxis Básica de JavaScript

University

10 Qs

A3 IIIB - Arrelgos PSeInt & Listas Python

A3 IIIB - Arrelgos PSeInt & Listas Python

10th Grade - University

10 Qs

IOTA : Web Development Bootcamp Quiz 3

IOTA : Web Development Bootcamp Quiz 3

University

10 Qs

SỬA BÀI KIỂM TRA HỌC KỲ - phần 1

SỬA BÀI KIỂM TRA HỌC KỲ - phần 1

1st Grade

10 Qs

bài tập

bài tập

10th - 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++) { }