JavaScript Basics Quiz

JavaScript Basics Quiz

University

25 Qs

quiz-placeholder

Similar activities

GO-4

GO-4

University

20 Qs

Commercial Law - MCQs

Commercial Law - MCQs

University

20 Qs

CryptoFactories.io v1.0

CryptoFactories.io v1.0

KG - Professional Development

20 Qs

FIM Week 5 Tutorial

FIM Week 5 Tutorial

University

20 Qs

Adwords Fundamentals??? Basic lang yan! T_T

Adwords Fundamentals??? Basic lang yan! T_T

University - Professional Development

20 Qs

SPS113: TUTORIAL 7

SPS113: TUTORIAL 7

University

20 Qs

PRETTYMUCH

PRETTYMUCH

KG - Professional Development

27 Qs

Techotsav

Techotsav

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?