# Which of the following options would be the correct output for the given JavaScript code var size=5; var x=5; var size=4; for(var j=size;j>=0;j--) { console.log(x); x=x-2; }

1.  5 5 5 5

2.  5 3 2 1

3.  5 3 1

4.  5 3 1 -1 -3

4

5 3 1 -1 -3

Explanation :
No Explanation available for this question

# Which of the following options would be the correct output for the given JavaScript code let x=0; for(x;x

1.  Error

2.  10

3.  0 1 2 3 4 5 6 7 8 9

4.  0

4

10

Explanation :
No Explanation available for this question

# What will be the function of the following JavaScript code var scope = "global scope"; function checkscope() { var scope = "local scope"; function f() { return scope; } return f; }

1.  Returns value null

2.  Returns exception

3.  Returns the value in scope

4.  Shows an error message

4

Returns the value in scope

Explanation :
No Explanation available for this question

# Among the following given JavaScript snipped codes, which is more efficient Code A:  for(var number=10;number>=1;number--) { console.log(number); } Code B:  var number=10; while(number>=1) { document.writeln(number); number++; }

1.  Code A

2.  Code B

3.  Both Code A and Code B

4.  Cannot Compare

4

Code A

Explanation :
No Explanation available for this question

# What will happen, if the following JavaScript code is executed let count = 0; while (count

1.  An error is displayed

2.  An exception is thrown

3.  The values of count variable are logged or stored in a particular location or storage

4.  The value of count from 0 to 9 is displayed in the console

4

The value of count from 0 to 9 is displayed in the console

Explanation :
No Explanation available for this question

# Which of the following given functions of the Number Object formats a number with a different number of digits to the right of the decimal

1.  toExponential()

2.  toFixed()

3.  toPrecision()

4.  toLocaleString()

4

toFixed()

Explanation :
No Explanation available for this question

# Which of the following function of the String object returns the character in the string starting at the specified position via the specified number of characters

1.  slice()

2.  split()

3.  substr()

4.  search()

4

substr()

Explanation :
No Explanation available for this question

# In JavaScript the x===y statement implies that

1.  Both x and y are equal in value, type and reference address as well.

2.  Both are x and y are equal in value only.

3.  Both are equal in the value and data type.

4.  Both are not same at all.

4

Both are equal in the value and data type.

Explanation :
No Explanation available for this question

# Choose the correct snippet from the following to check if the variable "a" is not equal to the "NULL":

1.  if(a!==null)

2.  if (a!)

3.  if(a!null)

4.  if(a!=null)

4

if(a!==null)

Explanation :
No Explanation available for this question

# In JavaScript, what will be used for calling the function definition expression:

1.  Function prototype

2.  Function literal

3.  Function calling

4.  Function declaration

4