JavaScript Variables Quiz

JavaScript Variables Quiz

7th Grade

10 Qs

quiz-placeholder

Similar activities

Roblox Studio concept review

Roblox Studio concept review

1st - 12th Grade

15 Qs

Coding 300: JavaScript/Python Vocab

Coding 300: JavaScript/Python Vocab

7th - 8th Grade

10 Qs

Front-end quiz

Front-end quiz

1st - 10th Grade

12 Qs

Python Basics

Python Basics

6th - 7th Grade

15 Qs

JavaScript quiz for beginners

JavaScript quiz for beginners

7th Grade

10 Qs

AppLab

AppLab

6th - 8th Grade

10 Qs

AV1\R1 3TEC_BE_Acesso a Propriedades em JavaScript 1 a 16

AV1\R1 3TEC_BE_Acesso a Propriedades em JavaScript 1 a 16

1st Grade - University

15 Qs

Computerastic

Computerastic

5th - 12th Grade

10 Qs

JavaScript Variables Quiz

JavaScript Variables Quiz

Assessment

Quiz

Computers

7th Grade

Hard

Created by

Ashish Chauhan

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the syntax for declaring a variable in JavaScript?

variableName = variableType

var/let/const variableName

variableName = var/let/const

variableName = value

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

How do you assign a value to a variable in JavaScript?

x = true

x = 10

x = 5

x = 'five'

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is a valid variable name in JavaScript? a) myVariable b) 123Variable c) $variable d) variable-name

d) variable-name

c) $variable

b) 123Variable

a) myVariable

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the purpose of declaring a variable in JavaScript?

To import external libraries

To create a function

To display data on the webpage

To store and manipulate data

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which keyword is used to declare a variable in JavaScript?

const

var

let

function

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What happens if you declare a variable without assigning a value to it?

The variable will have an initial value of undefined.

The variable will have an initial value of false.

The variable will have an initial value of 0.

The variable will have an initial value of null.

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is not a valid variable naming convention in JavaScript? a) camelCase b) snake_case c) PascalCase d) kebab-case

a) camelCase

b) snake_case

d) kebab-case

c) PascalCase

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?