JavaScript Quiz

JavaScript Quiz

12th Grade

18 Qs

quiz-placeholder

Similar activities

AP Computer Science Principles Quiz

AP Computer Science Principles Quiz

JavaScript Coding Quiz

JavaScript Coding Quiz

JS Basics Quiz

JS Basics Quiz

JavaScript Variables Quiz

JavaScript Variables Quiz

Intro to Programming Final Review

Intro to Programming Final Review

javaScript Basics

javaScript Basics

JavaScript Quiz

JavaScript Quiz

JavaScript Quiz

JavaScript Quiz

Assessment

Quiz

Computers

12th Grade

Easy

Created by

Donshay Somborn

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

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

18 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a variable in JavaScript?

A section of the website

A way to store information that can be used later

A type of function

A loop that runs forever

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a way to define an array in JavaScript?

var colors = "red", "green", "blue";

var colors = 1: "red", 2: "green", 3: "blue";

var colors = ["red", "green", "blue"];

var colors = (1 = "red", 2 = "green", 3 = "blue");

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you declare a variable in JavaScript?

var myVariable;

variable myVariable;

v myVariable;

declare myVariable;

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you create a variable with the numeric value 5?

var x = 5;

num x = 5;

number x = 5;

x = 5;

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code snippet? ```javascript var a = true; var b = false; var c = a + b; ```

"truefalse"

1

0

"1false"

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a variable in JavaScript?

A section of the document

A type of JavaScript data

A container for storing data values

A command that performs a specific action

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct way to declare a variable in JavaScript?

`var name = "John";`

`variable name = "John";`

`String name = "John";`

`name := "John";`

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?