JavaScript Variables Quiz

JavaScript Variables Quiz

7th Grade

10 Qs

quiz-placeholder

Similar activities

Python

Python

KG - Professional Development

13 Qs

Limbaj de programare

Limbaj de programare

7th - 8th Grade

12 Qs

Computer science basics 2

Computer science basics 2

6th - 8th Grade

10 Qs

Java Script

Java Script

5th - 7th Grade

8 Qs

Quiz 9 (15.09.2021)

Quiz 9 (15.09.2021)

1st - 12th Grade

10 Qs

JS For Loops

JS For Loops

7th Grade

15 Qs

Quiz sobre JavaScript

Quiz sobre JavaScript

7th Grade

15 Qs

JavaScript-01

JavaScript-01

5th - 7th Grade

11 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?