Search Header Logo

COMP3421-RetakeAssessment

Authored by COMP 3421

Computers

University

Used 1+ times

COMP3421-RetakeAssessment
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is NOT a type of JavaScript loop?

 For loop

While loop

do-while loop

do...for

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the purpose of the "this" keyword in JavaScript?

To refer to the global scope

To refer to the parent scope

To refer to the current scope

To refer to the window object

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

  1. What is the output of the following JS code?

  2. let x = 5;

  3. let y = 10;

  4. x = y++;

  5. console.log(x);

5

10

11

6

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

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

function myFunction() { /* body */}

let myFunction = function() { /* body */}

const myFunction = () => { /* body */ }

All of the given options

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of this JS code?

let x = 3, y = 2;

let result = (x > y) ? x : y;

console.log(result);

3

2

"x > y"

"y < x"

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

what is the datatype of 'x' in following code?

const x = 42;

String

Number

Boolean

Undefined

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of following JS code?

let x = 5 + 2 + "7";

console.log(x);

7

14

77

527

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?