Search Header Logo

Frontend Summer Internship Quiz-9

Authored by Gnaneshwar Reddy

Professional Development

Professional Development

Frontend Summer Internship Quiz-9
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will this function return if you pass an Object?

Please note: Object.keys(mObj) will return an array of all the keys in "mObj" object.

  • List of keys

  • Error

  • Copy of that object

  • None of the above

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be printed in the console?

 

console.log(parseInt(false))

console.log(Number(false))

  • 0 and 0

  • NaN and NaN

  • NaN and 0

  • Error

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be printed in the console?

 

var num1 = 100;

 

var result = num1 > 50 ? (num1+10) < 100 ? (num1 + 20) : (num1 + 50) < 200 ? (num1 + 500) : (num1 + 200) : num1;

console.log(result)

  • 120

  • 150

  • 100

  • 600

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be printed in the console?

 

console.log(num1);

num1 = 10;

console.log(num1);

var num1;

  • Error

  • undefined and 10

  • undefined and undefined

  • 10 and 10

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output?

var num1 = 10;

var num2 = 20;

var num3 = 30;

var sum1 = ++num1 + num2++ + num3++;

var sum2 = num1++ + ++num2 + ++num3;

var sum3 = num1++ + num2++ + num3++;

console.log(sum1 + sum2 + sum3)

  • 190

  • 192

  • 195

  • 196

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code?(delete operator removes a property from an object)


var output = function (x) {

delete x;

return x;

};

console.log(output(9));

  • Undefined

  • 9

  • null

  • Error: Can not reference the variable x

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code?


var dummy = true;

console.log(dummy + 0);

console.log(dummy + "xyz");

console.log(dummy + true);

console.log(dummy + false);

  • true, "truexyz", "truettrue", "truefalse"

  • 1, "truexyz", 2, 1

  • true, "truexyz", true , true

  • 1, "truexyz", 1, 0

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 Professional Development