Logo

Javascript Questions Set 30:

Quiz Mode

Level 3 of DOM events standardizes to which event?

1
2
3
4

Solution:

What kind of expression is "new Point(2,3)"?

1
2
3
4

Solution:

What will be the output of the following code?


var a1 = [,,,]; 

var a2 = new Array(3); 

0 in a1 

0 in a2

1
2
3
4

Solution:

What must be done to implement Lexical Scoping?

1
2
3
4

Solution:


What will be the output of the following JavaScript code?


var a = [1,2,3,4,5];

a.slice(0,3);


1
2
3
4

Solution:

Which React class-based component life cycle methods does the useEffect hook serve the same purpose as?

1
2
3
4

Solution:

What will be the output of the following JavaScript code?


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

<script>

var x = 5;

var y = 2;

var z = x % y;

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

</script>

1
2
3
4

Solution:

With respect to the following class, how will you create an object?

1
2
3
4

Solution:

What is the meaning of 'Augmenting classes' in JavaScript?

1
2
3
4

Solution:

 

What will be the output of the following JavaScript code?

<p id="demo"></p>
<script>
var numbers = [45, 4, 9, 16, 25];
var someOver18 = numbers.some(myFunction);
document.getElementById("demo").innerHTML = "Some over 18 is " + someOver18;
function myFunction(value, index, array)
{
 return value > 10;
}
</script>

1
2
3
4

Solution: