JavaScript Basics Quiz

JavaScript Basics Quiz

University

25 Qs

quiz-placeholder

Similar activities

Operations Management (THSM3)

Operations Management (THSM3)

University

20 Qs

Coded Clues Round-1

Coded Clues Round-1

University

20 Qs

IPC Travel case stidy

IPC Travel case stidy

3rd Grade - University

20 Qs

С# моделдеу

С# моделдеу

University

20 Qs

Quiz struktur data

Quiz struktur data

University

20 Qs

FE Induction Quizz

FE Induction Quizz

University

20 Qs

22. Professional sports (Intermediate)

22. Professional sports (Intermediate)

University

20 Qs

Analisis Laporan Keuangan

Analisis Laporan Keuangan

University

20 Qs

JavaScript Basics Quiz

JavaScript Basics Quiz

Assessment

Quiz

Other

University

Practice Problem

Medium

Created by

elementas undefined

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

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

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to declare a variable in JavaScript using var?

variable num = 10;

var num = 10;

int num = 10;

let num = 10;

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is NOT a valid JavaScript variable name?

var myVar;

var _myVar;

var 123var;

var $myVar;

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax to assign a value to a variable?

var x; x == 10;

var x = 10;

var x <- 10;

x := 10;

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code? var car = "Tesla"; console.log(car);

Tesla

undefined

null

car

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

var 1name = "John";

var name1 = "John";

var #name = "John";

var name-1 = "John";

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code? var num; console.log(num);

undefined

null

0

Error

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the var keyword in JavaScript?

To declare a function

To declare a variable

To define a loop

To print output

Access all questions and much more by creating a free account

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?