Logo

Javascript Questions Set 48:

Quiz Mode

Which is more widely used than GWT in Google? 

1
2
3
4

Solution:

In a DOM model, what is the root element in a HTML document?

1
2
3
4

Solution:

  If you have var y = 1, x = y = typeof x; What is the value of x? 

1
2
3

Solution:

What is the data type of the parameter for the go() method?

1
2
3
4

Solution:

Which tag is required to create a class-based component in React?

1
2
3
4

Solution:

What is the correct syntax for a while loop in JavaScript?

1
2
3
4

Solution:

Which of the following JavaScript methods does not serialize the undefined values or objects within an object?

1
2
3
4

Solution:

What must we do to implement Lexical Scoping in JavaScript?

1
2
3
4

Solution:

What will be the output of the following JavaScript code?


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

<script>

var x = 10;

var y = 20;

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

</script>

1
2
3
4

Solution:

What will be the output of the following JavaScript code?

<p id="demo"></p>
<script>
function myFunction()
{
  var str = " Is th is it?";
  var patt1 = /^is/m;
  var result = str.match(patt1);
  document.getElementById("demo").innerHTML = result;
}
</script>

1
2
3
4

Solution: