Thẻ ghi nhớ: Interactivity with JavaScript - Week 3 Quiz | Quizlet

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/15

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 1:54 PM on 5/21/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

16 Terms

1
New cards

Arrays can store multiple, related pieces of information.

True

False

True

2
New cards

Array indexes start with 0. [0] is the first element. [1] is the second element, etc.

True

False

True

3
New cards

Arrays can store multiple, related pieces of information, but they must all be of the same type (String, Object, etc.).

True

False

False

4
New cards

Which is the proper way to declare an array?

var grades= (80, 87, 94, 82, 62, 98, 81, 81, 74, 91)

var grades= [80, 87, 94, 82, 62, 98, 81, 81, 74, 91]

array grades= [80, 87, 94, 82, 62, 98, 81, 81, 74, 91]

grades= Array(80, 87, 94, 82, 62, 98, 81, 81, 74, 91)

var grades= [80, 87, 94, 82, 62, 98, 81, 81, 74, 91]

5
New cards

Every index in an array must be a numeric value.

True

False

True

6
New cards

Elements are referenced by index.

True

False

True

7
New cards

In JavaScript the first index in an array is 0.

True

False

True

8
New cards

What is the value of the element in position 4?

12 45 32 56 1 12 10

1

9
New cards

What is the index of the element with the value of 10?

12 45 10 56 1 14 12

2

10
New cards

var my_array = [2, 4, 6, 8, 10]

What is the value of my_array[2] ?

2

4

6

8

10

Undefined

6

11
New cards

var my_array = [2, 4, 6, 8, 10]

What is the value of my_array.length ?

5

4

Undefined

5

12
New cards

JavaScript Arrays have attributes and methods.

True

False

True

13
New cards

When declaring an array Spaces and line breaks are important. A declaration can not span multiple lines.

True

False

False

14
New cards

Which of these is not valid? (Hint, pay attention to if the method should return one thing, or many things...)

var my_array = document.getElementsByTagName(tagName)

first_element = my_array[0]

var my_array = document.getElementsByClassName(className)

first_element = my_array[0]

var my_array = document.querySelector(#idName)

first_element = my_array[0]

var my_array = document.querySelector(#idName)

15
New cards

If your browser supports debugging, you can use which of the following to display JavaScript values in the debugger window:

console.debug

document.log

document.debug

console.log

console.log

16
New cards

How do you properly access the third element in an array variable named "fruit"?

[fruit]3

fruit[3]

fruit_3

None of the above

fruit[3]