JavaScript Variables Quiz

JavaScript Variables Quiz

7th Grade

10 Qs

quiz-placeholder

Similar activities

Javascript

Javascript

KG - Professional Development

13 Qs

Coding: Conditionals

Coding: Conditionals

6th - 8th Grade

10 Qs

JavaScript Strings

JavaScript Strings

7th Grade

15 Qs

Code Combat JavaScript Quiz

Code Combat JavaScript Quiz

4th - 8th Grade

13 Qs

MINECRAT: Learn and have fun

MINECRAT: Learn and have fun

5th - 7th Grade

13 Qs

sagutan mo nalang 2

sagutan mo nalang 2

6th - 8th Grade

10 Qs

JavaScript Variables

JavaScript Variables

7th Grade

10 Qs

JavaScript ievads

JavaScript ievads

7th - 8th 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?