JavaScript Test 1

JavaScript Test 1

9th - 12th Grade

23 Qs

quiz-placeholder

Similar activities

JavaScript Loops Quiz

JavaScript Loops Quiz

Fundamentals of Programming Part 2

Fundamentals of Programming Part 2

Understanding Conditional Statements in Code.org Unit 4 Lesson 7

Understanding Conditional Statements in Code.org Unit 4 Lesson 7

JavaScript Basics

JavaScript Basics

JavaScript Loop Mastery

JavaScript Loop Mastery

Understanding If-Else Statements in JavaScript

Understanding If-Else Statements in JavaScript

JavaScript Test 1

JavaScript Test 1

Assessment

Quiz

Computers

9th - 12th Grade

Practice Problem

Easy

Created by

Ryan Valles

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

23 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What function in JavaScript is used to prompt the user for input?

input()

prompt()

ask()

getInput()

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the value null represent in JavaScript?

A defined variable.

An undefined variable.

A boolean value.

A nullified function.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which operator is used to concatenate strings in JavaScript?

+

-

*

/

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does an if statement do in JavaScript?

Executes a block of code repeatedly.

Executes a block of code only if a specified condition is true.

Terminates the program.

Declares variables.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the difference between a while loop and a for loop?

A while loop requires a counter variable.

A for loop cannot contain conditions.

A while loop executes a block of code while a condition is true, without an explicit counter.

A for loop is more efficient for iterating over arrays.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to add alternative code to an if statement, to be executed if the condition is false?

else

and

or

then

7.

MULTIPLE SELECT QUESTION

30 sec • 1 pt

Which of the following is a valid JavaScript variable name?

2ndVariable

_variable

$variableName

variable name

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?