0 votes
in JavaScript by
See the given code of JavaScript and choose the correct output from the following:

functioncomparing()  

{  

intx=9;  

chary=9;  

if(x==y)  

returntrue;  

else  

returnfalse;  

}  

a) compilation error

b) false

c) runtime error

d) true

1 Answer

0 votes
by

Answer: D

reason: The "==" operatorconverts the both operand to the same type in case they both are of different datatype and perform comparison. A strict comparison will give true as output only when the content and the data type of both operands are same.

...