Search Header Logo

Full Stack Quiz 10

Authored by Vindhya Gaddam

Professional Development

Professional Development

Used 1+ times

Full Stack Quiz 10
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

Which function among the following lets to register a function to be invoked once?


setTimeout()

setInterval()

settime()

setTotaltime()

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following JavaScript code?

<p>1</p>

<p>2</p>

<p>3</p>

<p> hello </p>

 

<script>

function myFunction()

{

   var s = document.getElementsByTagName("P").length;

   alert(s);

}

</script>

1

2

3

4

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following JavaScript code?

 

<head id="myHead">

  <title>My title</title>

</head>

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

<script>

function myFunction()

{

   var x = document.head.id;

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

}

</script>

demo

myHead

error

undefined

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In which of the following ways could we change the content of an element node divElement to the text 'Changed'?

 

BdivElement.innerText = 'Changed'

AdivElement.innerHTML = 'Changed'

DdivElement.appendChild(document.createTextNode('Changed'))

Both a & b

CdivElement.innerContent = 'Changed'

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following represents loops in javascript?

for

  while

forEach

All of the above

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What among the following is an appropriate when an event occurs when the user clicks on an element?

 

  onclick

onchange

onkeyup

onblur

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

 Consider the below code:

Identify the correct code in order to fetch the value entered in username text field?

< body>

< form name="register">

Enter username < input value="John" id="name" name="username">

< /form>

< /body>

 

document.getElementById ("name").value

document.getElementByName ("name").value

   None of the above

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