JavaScript Variables and Data Types

JavaScript Variables and Data Types

10th Grade

10 Qs

quiz-placeholder

Similar activities

Java Lesson 2

Java Lesson 2

5th Grade - University

8 Qs

Criando funções em JavaScript

Criando funções em JavaScript

9th Grade - University

6 Qs

End of Unit 3 Quiz Review

End of Unit 3 Quiz Review

6th - 12th Grade

14 Qs

Kiểm tra thường xuyên lần 2 (11/8-11/6)

Kiểm tra thường xuyên lần 2 (11/8-11/6)

KG - 12th Grade

10 Qs

ICT QUIZ Q3 MOD 1-5

ICT QUIZ Q3 MOD 1-5

10th Grade

10 Qs

[Kelas 8 SMP] Bab 1 - Bahasa Program Java

[Kelas 8 SMP] Bab 1 - Bahasa Program Java

8th Grade - University

10 Qs

Java Strings

Java Strings

1st Grade - Professional Development

10 Qs

TLE Q4 M3

TLE Q4 M3

10th Grade

10 Qs

JavaScript Variables and Data Types

JavaScript Variables and Data Types

Assessment

Quiz

Other

10th Grade

Medium

Created by

Chandra Sekhar

Used 2+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of variables in JavaScript?

Variables in JavaScript are unnecessary and should be avoided.

Variables in JavaScript are used to confuse programmers.

The purpose of variables in JavaScript is to make the code more complicated.

The purpose of variables in JavaScript is to store and manipulate data.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to declare a variable in JavaScript?

function

var

const

let

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are the different data types supported by JavaScript?

integer, float, array, function, character, boolean, object

text, decimal, list, method, character, true, false

word, digit, list, function, character, true, false

string, number, boolean, null, undefined, object, symbol

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you declare a string variable in JavaScript?

var myString = 'Hello';

let myString = 'Hello';

const myString = 'Hello';

var myString = 'Hello World';

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the difference between null and undefined in JavaScript?

null is a value that is automatically assigned to variables that have not been assigned a value, while undefined represents intentional absence of any object value

null is used to represent a value that is unknown or has not been set, while undefined is used to represent a variable that has been declared but has not been assigned a value

null is a value that is automatically assigned to variables that have not been assigned a value, while undefined is used to represent a value that is unknown or has not been set

null represents intentional absence of any object value, while undefined is automatically assigned to variables that have not been assigned a value

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you declare a number variable in JavaScript?

let num = 10;

var num = '10';

var num = 10;

const num = 10;

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of adding a number and a string in JavaScript?

The result is an error.

The result is a number.

The result is a boolean.

The result is a string concatenation.

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?