JavaScript Quiz

JavaScript Quiz

12th Grade

22 Qs

quiz-placeholder

Similar activities

1.1.3 Input, output and storage

1.1.3 Input, output and storage

11th Grade - University

22 Qs

Security and Ethics

Security and Ethics

9th - 12th Grade

17 Qs

Design your website

Design your website

7th - 12th Grade

20 Qs

2021.10.15_ Đề kiểm tra tin học 12

2021.10.15_ Đề kiểm tra tin học 12

12th Grade

20 Qs

3D Objects - Terms & Transfomations

3D Objects - Terms & Transfomations

6th Grade - Professional Development

20 Qs

Uji Pemahaman Microsoft Word X TKJ 1

Uji Pemahaman Microsoft Word X TKJ 1

12th Grade

20 Qs

Introduction to JavaScript

Introduction to JavaScript

9th - 12th Grade

20 Qs

SST Yr8 - NCCE - Algorithms 2

SST Yr8 - NCCE - Algorithms 2

9th - 12th Grade

18 Qs

JavaScript Quiz

JavaScript Quiz

Assessment

Quiz

Computers

12th Grade

Practice Problem

Medium

Created by

Tyler Newman

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

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

22 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will the following code print to the console?

developer

"developer"

Naomi

"Naomi"

Answer explanation

The code will print "Naomi" to the console because the string is enclosed in double quotes, indicating a literal string.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a non-primitive data type in JavaScript?

Number

String

Boolean

Array

Answer explanation

The non-primitive data type in JavaScript is Array. Number, String, and Boolean are all primitive data types.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you access the first value in an array named 'rows' in JavaScript?

rows[1]

rows[0]

rows.first

rows[2]

Answer explanation

To access the first value in an array named 'rows' in JavaScript, you use 'rows[0]' since array indexing starts at 0.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword should be used to declare variables that should not be reassigned in JavaScript?

A) let

B) var

C) const

D) static

Answer explanation

The keyword 'const' should be used to declare variables that should not be reassigned in JavaScript.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the .log() method do in JavaScript?

A) Adds a value to the end of an array

B) Removes the first element from an array

C) Logs a message to the console

D) Removes the last element from an array

Answer explanation

The .log() method in JavaScript logs a message to the console, making option C the correct choice.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the less than operator (<) allow you to check?

If the value on the left is greater than the value on the right

If the value on the left is equal to the value on the right

If the value on the left is less than the value on the right

If the value on the right is less than the value on the left

Answer explanation

The less than operator (<) allows you to check if the value on the left is less than the value on the right.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will the expression count < 3 evaluate to if count is 4?

false

true

undefined

null

Answer explanation

The expression count < 3 will evaluate to false if count is 4 because 4 is not less than 3. Therefore, the correct answer is false.

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?