JavaScript Variables Quiz

JavaScript Variables Quiz

9th - 12th Grade

26 Qs

quiz-placeholder

Similar activities

JavaScript:  Numbers Guessing Game

JavaScript: Numbers Guessing Game

JS Functions

JS Functions

IP: JavaScript & jQuery

IP: JavaScript & jQuery

CodeHS JavaScript Control Functions

CodeHS JavaScript Control Functions

JavaScript Variables Quiz

JavaScript Variables Quiz

Assessment

Quiz

Computers

9th - 12th Grade

Medium

Created by

K B

Used 6+ times

FREE Resource

AI

Enhance your content in a minute

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

26 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Show Me What You Got! How do you declare a variable in JavaScript?

let

function

var

variable

2.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

Show Me What You Got! What are the different types of values that a variable in JavaScript can represent?

apple, banana, orange, grape

cat, dog, bird, fish

red, blue, green, yellow

string, number, boolean, object, function, undefined

3.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

Show Me What You Got! Is JavaScript attentive to the way we dress up variable names, paying attention to uppercase and lowercase letters?

No

Yes

Sometimes

Only on weekends

4.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

Show Me What You Got! You're creating a new variable in JavaScript for your intergalactic DJ app. What rules must you follow for naming it?

Variable names must begin with a letter, underscore (_), or dollar sign ($)

Variable names must begin with a special character

Variable names must begin with a number

Variable names must begin with a hyphen

5.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

Show Me What You Got! Imagine you're a developer working on a JavaScript project. You declare a variable but forget to assign it any value. What does JavaScript default this variable to?

undefined

false

0

null

6.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

Show Me What You Got! Explain the difference between 'let', 'var', and 'const' in JavaScript variable declaration.

They are all used for declaring global variables only

They have different scopes and usage in JavaScript.

They are all the same and can be used interchangeably

They are all outdated and not recommended for modern JavaScript development

7.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

Show Me What You Got! Can a variable name in JavaScript be initiated with a digit?

Yes

Maybe

Only on Tuesdays

No

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?