Logo

Javascript Questions Set 169:

Quiz Mode

How to check if two nodes are equal?

1
2
3
4

Solution:

What is the alternative command used in Node.js for load()?

1
2
3
4

Solution:

How can you create a node for a comment in JavaScript?

1
2
3
4

Solution:

What are the main types of scope in JavaScript?

1
2
3
4

Solution:

 Which function of an Array object calls a function for each element in the array?

1
2
3
4

Solution:

Find the output of the following code:


<script>

var x=[2,4,7,25];

var i;

for (i of x) {

  document.write(i + "");

}

</script>

Solution:

What will be the output of the following code?

 

<p id="demo"></p>
<script>
var a = 10;
a *= 2;
document.getElementById("demo").innerHTML = a;
</script>

1
2
3
4

Solution:

When does JavaScript code appear inline within an HTML file?

1
2
3
4

Solution:

What will happen if the fvonly parameter is set to 1?

1
2
3
4

Solution:

Assume that we have to convert “false” that is a non-string to string. The command that we use is (without invoking the “new” operator). 

1
2
3
4

Solution: