Logo

Javascript Questions Set 125:

Quiz Mode

How many node types are there in total?

1
2
3
4

Solution:

Which of the following is a ternary operator?

1
2
3
4

Solution:

Arrow functions are also called

1
2
3
4

Solution:

Which of the following is not a socket property?

1
2
3
4

Solution:

$("___").hide();

What is the correct selector to hide all the elements from a document.?


Solution:

What is the output of the following code?


<script>

var x = 38245.99;

var y = Math.floor(x);

document.write(y);

</script>

1
2
3
4

Solution:

 What is the function used to remove all handlers for name events? 

1
2
3
4

Solution:

What will the output of the following code be?

const array = [1, 2, 3, 4, 5];

const even = (element) => element % 2 === 0;

console.log(array.some(even));

1
2
3
4

Solution:

What will be the output of the following JavaScript code?

<p id="demo"></p>
<script>
function myFunction()
{
  var str = "hello to \r world.";
  var patt1 = /\v/;
  var result = str.search(patt1);
  document.getElementById("demo").innerHTML = result;
}
</script>

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: