wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Arrays Javascript (CodeCademy)

Total questions: 10

Worksheet time: 9mins

Name
Class
Date
1.
What surrounds an array?
a)
Quotations
b)
Curly Brackets
c)
Parenthesis
d)
Square Brackets
2.

array = [2,0,3,5,4] What is the length of this array?

a)

5

b)

4

c)

0

d)

125.4

3.

Which definition below best describe an array?

a)

An array is a function identifier that can hold more than one parameter.

b)

An array is a beam of light.

c)

An array is a special variable, which can hold more than one value at a time.

d)

An array is a special function, which can hold more than one value at a time.

4.

What is proper syntax for declaring a array in JavaScript?

a)

const arrayName =[ ];

b)

let arrayName[ ] ={ };

c)

array arrayName ={ };

d)

obj var arrayName =[ ];

5.
How would you change the first element in an array?
a)
nums[1] = "New!";
b)
nums = "New!";
c)
var nums[1] = "New!";
d)
nums[0] = "New!";
6.
array = [1,2,3,4,5];
What is the highest position in this array?
HINT: Remember arrays start at position 0!
a)
4
b)
5
c)
0
d)
125.7
7.
What property tells you how many items are in an array?
a)
length
b)
count
c)
items
d)
num
8.

The length() method for an array will return _____.

a)

the number of elements in the array

b)

the last index value of the array.

c)

the length of the name of the array variable

d)

the capacity of the array

9.

The push() method adds a new element to the end of an array

a)

true

b)

false

10.

When we can change the contents of an array, but cannot reassign the variable name to a new array or other data type.

a)

Muteable

b)

Arrow Function

c)

Global Scope