JavaScript Basics Quiz

JavaScript Basics Quiz

University

25 Qs

quiz-placeholder

Similar activities

Python workshop day2

Python workshop day2

University

20 Qs

Quanta

Quanta

University

20 Qs

Algo-Unlock

Algo-Unlock

University

20 Qs

Java Booleans FQ1

Java Booleans FQ1

University

20 Qs

round 2

round 2

University

25 Qs

Python FATEC

Python FATEC

University

24 Qs

JavaScript Practice 9 & 10

JavaScript Practice 9 & 10

University

21 Qs

Repaso general

Repaso general

University

30 Qs

JavaScript Basics Quiz

JavaScript Basics Quiz

Assessment

Quiz

Other

University

Medium

Created by

elementas undefined

Used 1+ times

FREE Resource

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

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?