Quiz on Sample Code - JavaScript

Quiz on Sample Code - JavaScript

Professional Development

6 Qs

quiz-placeholder

Similar activities

MyPertamina Hero Goes To Mandalika 2023

MyPertamina Hero Goes To Mandalika 2023

Professional Development

10 Qs

MSDM.net Quiz 110

MSDM.net Quiz 110

Professional Development

10 Qs

Kuis BO Periode Januari 2023

Kuis BO Periode Januari 2023

Professional Development

10 Qs

KUIS MSC VOL 11

KUIS MSC VOL 11

Professional Development

10 Qs

Pretest Hari Kedua LKMM-TMxSK

Pretest Hari Kedua LKMM-TMxSK

Professional Development

10 Qs

Workshop RCA

Workshop RCA

Professional Development

10 Qs

Desafío Java fácil

Desafío Java fácil

Professional Development

10 Qs

Kuis Panel Surya

Kuis Panel Surya

Professional Development

10 Qs

Quiz on Sample Code - JavaScript

Quiz on Sample Code - JavaScript

Assessment

Quiz

Professional Development

Professional Development

Practice Problem

Hard

Created by

Usha B A

Used 3+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

6 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following JavaScript code?

<p id="demo"></p>

var txt1 = "St'Joseph's_";

var txt2 = "IT";

document.getElementById("demo").innerHTML = txt1 + txt2;

error

St'Joseph's_ IT

undefined

St'Joseph's_IT

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following JavaScript code?

<p id="demo">

</p> <script>

var js = 10;

js *= 5;

document.getElementById("demo").innerHTML = js;

</script>

10

50

5

Error

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Will the following JavaScript code work?

var js = (function(x) {return x*x;}(10));

Exception will be thrown

Memory leak

Error

Yes, perfectly

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following JavaScript code snippet?

int a=1;

if(a!=null) // JavaScript not equal to Operators

return 1;

else

return 0;

0

1

Compiler Error

Runtime Error

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following JavaScript code?

function height()

{

var height = 123.56;

var type = (height>=190) ? "tall" : "short";

return type;

}

short

123.56

tall

190

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following JavaScript function?

<p id="demo">

</p> <script>

function javascript()

{

// javacript abs() method

document.getElementById("demo").innerHTML = Math.abs(-7.25);

}

</script>

-7.25

7.25

-7

7

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