Logo

Javascript Questions Set 118:

Quiz Mode

Which object does URL property belongs to?

1
2
3
4

Solution:

The syntax of close method for document object is ________.

1
2
3
4

Solution:

From where should React Hooks be called?

1
2
3
4

Solution:

 _______ class provides an interface for invoking JavaScript methods and examining JavaScript properties.

1
2
3
4

Solution:

What will be the output of the following JavaScript code?

<p id="demo"></p>
<script>
document.getElementById("demo").innerHTML = Math.sqrt(49);
</script>

1
2
3
4

Solution:

Which of the following executes JavaScript code?

1
2
3
4

Solution:

Which of the following are correct ways of declaring a function in JavaScript?

1
2
3
4

Solution:

What is the purpose of the importNode() method?

1
2
3
4

Solution:

Which process is done in the following JavaScript code?


o = {x:1, y:{z:[false,null,""]}}; 

s = JSON.stringify(o); 

p = JSON.parse(s);

1
2
3
4

Solution:

What will be the output of the following JavaScript code?

<button onclick="myFunction()">Try it</button>
<p id="demo">one</p>
<script>
function myFunction()
{
  var str = document.getElementById("demo").innerHTML;
  var txt = str.replace("one","two");
  document.getElementById("demo").innerHTML = txt;
}
</script>

1
2
3
4

Solution: