JavaScript Quiz

JavaScript Quiz

12th Grade

22 Qs

quiz-placeholder

Similar activities

12AIT - All About W3C <3

12AIT - All About W3C <3

10th Grade - University

18 Qs

Summative Test in EMPTECH 3rd

Summative Test in EMPTECH 3rd

12th Grade

20 Qs

History of Package Design

History of Package Design

9th - 12th Grade

20 Qs

NP IT Quiz ปริศนาไอที #4

NP IT Quiz ปริศนาไอที #4

9th - 12th Grade

20 Qs

PRE & POST MAINTENANCE

PRE & POST MAINTENANCE

1st - 12th Grade

20 Qs

Pointers

Pointers

12th Grade

20 Qs

Name The Disney Animation Films

Name The Disney Animation Films

KG - University

20 Qs

Clean, Sanitize and Store Kitchen Tools and Equipment

Clean, Sanitize and Store Kitchen Tools and Equipment

11th - 12th Grade

20 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.

Create a free account and access millions of resources

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?