0 votes
in JavaScript by

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

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

b) Both are x and y are equal in value only.

c) Both are equal in the value and data type.

d) Both are not same at all.

1 Answer

0 votes
by
edited by

Answer: C

Reason: The "===" statement are called strict comparison which only gets true only if the type and content of both the operand are strictly same.

Program

  1. <!DOCTYPE html>  
  2. <html>  
  3. <head>  
  4.     <H1>The concept of the "===" stement</H1>  
  5. </head>  
  6. <body>  
  7. <script>  
  8. var x=0,y=0;  
  9. var a=0b=1;  
  10. if(x===y){  
  11.     document.write(true);  
  12. }  
  13. else{  
  14.     document.write(false);  
  15. }   
  16. if (a===b){  
  17.     document.write(true);  
  18. }else  
  19. { document.write(false);  
  20.   
  21.       }  
  22. </script>  
  23. </body>  
  24. </html>  

Output

True
False 
...