Logo

Javascript Questions Set 31:

Quiz Mode

What will be the output?

console.log(NaN === NaN);

1
2

Solution:

How many ways are available to display data in JavaScript?

1
2
3
4

Solution:

The escape sequence '\f' stands for

1
2
3
4

Solution:

var foo = function foo() {
   console.log(foo === foo);  
};
foo();

1
2
3
4

Solution:

What does the 'this' keyword refer to?

1
2
3
4

Solution:

What will be the output of the following JavaScript code?

var a = 10;

do {

  a += 1;

  console.log(a);

} while (a < 5);

1
2
3
4

Solution:

What does the application layer handle?

1
2
3
4

Solution:

What will be the output of the following JavaScript code?


int sum=0;

 

var arr = [1,5,2,3];  

 

arr.forEach(function myFunction(element) 

{  

     sum= sum+element;  

});  

document.writeln(sum);


1
2
3
4

Solution:

Which API allows scripts in a document from one server to exchange messages with scripts in a document from another server?

1
2
3
4

Solution:

What is the output of the following JavaScript code?

<!DOCTYPE html>

<html>

<head>

<title> abekus </title>

</head>

<body>

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

<script>

var x = 5 + 15 + "30";

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

</script>

</body>

</html>

1
2
3
4

Solution: