Search Header Logo

JavaScript Output Quiz

Authored by Karen Tan

Computers

University

Used 5+ times

JavaScript Output Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code? let x = 5; let y = "5"; console.log(x == y);

true

false

undefined

Error

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output? let a; console.log(a);

null

undefined

Error

NaN

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be logged to the console? const PI = 3.14; PI = 3.14159; console.log(PI);

3.14

3.14159

Error

undefined

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens when running the following code? var x = 10; console.log(y); var y = 20;

10

undefined

ReferenceError

20

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output? console.log(2 + "2");

4

22

NaN

Error

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output? console.log(2 * "2");

4

22

NaN

Error

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be printed? let result = 10 > 5 ? "Yes" : "No"; console.log(result);

Yes

No

true

false

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?

Discover more resources for Computers