JavaScript Data Types and Structures

JavaScript Data Types and Structures

12th Grade

29 Qs

quiz-placeholder

Similar activities

Topic D - Types of programming and mark up languages

Topic D - Types of programming and mark up languages

12th Grade

24 Qs

TIN 12_BÀI 4

TIN 12_BÀI 4

12th Grade

26 Qs

Briana Review

Briana Review

12th Grade

25 Qs

CSCu_Data Encrypt

CSCu_Data Encrypt

9th - 12th Grade

25 Qs

TECH SUMMER CHALLENGE AGE 13-17

TECH SUMMER CHALLENGE AGE 13-17

9th - 12th Grade

25 Qs

UH PEMROGRAMAN DASAR

UH PEMROGRAMAN DASAR

9th - 12th Grade

25 Qs

Latihan OSNK Informatika 2025 Bag 2

Latihan OSNK Informatika 2025 Bag 2

9th - 12th Grade

25 Qs

Fourth Grade March Rivision

Fourth Grade March Rivision

4th Grade - University

24 Qs

JavaScript Data Types and Structures

JavaScript Data Types and Structures

Assessment

Quiz

Computers

12th Grade

Practice Problem

Medium

Created by

Harold Peaden

Used 5+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

29 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

Which of the following is a simple (primitive) data type in JavaScript?

number

array

object

function

Answer explanation

Correct Answer: number
❌ array → complex data type.
❌ object → complex data type.
❌ function → technically a type of object, not primitive.

2.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

True or False: Strings are considered complex data types.

True
False

Answer explanation

Correct Answer: False
❌ Strings are primitive data types.

3.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

What type of data structure is used to hold an ordered list of values?

string

array

boolean

number

Answer explanation

Correct Answer: array


❌ string → holds characters, not a list.
❌ boolean → only true/false.
❌ number → single numeric value.

4.

FILL IN THE BLANK QUESTION

1 min • 3 pts

Fill in the blank: Array indexes in JavaScript start at ____.

Answer explanation

Correct Answer: 0

5.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

Media Image

10

20

30

undefined

Answer explanation

Correct Answer: 20


❌ 10 → index 0.
❌ 30 → index 2.
❌ undefined → only happens if index doesn’t exist.

6.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

Which code correctly changes the second item in an array to 50?

Media Image
Media Image
Media Image
Media Image

Answer explanation

Correct Answer: nums[1] = 50;


❌ nums[2] = 50; → changes the third item.
❌ nums[0] = 50; → changes the first item.
❌ nums.update() → not valid in JS.

7.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

True or False: The .length property of an array returns the last index.

True
False

Answer explanation

Correct Answer: False


❌ .length returns the total count, not the last index.

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?