Q. What is the difference between the two lines given below ?

Code:
!!(object1 && object2);
(object1 && object2);
  • (A) Both the lines checks just for the existence of the object alone
  • (B) The first line results in a real boolean value whereas the second line merely checks for the existence of the objects
  • (C) Both the lines result in a boolean value “False”
  • (D) Both the lines result in a boolean value “True”
πŸ’¬ Discuss
βœ… Correct Answer: (B) The first line results in a real boolean value whereas the second line merely checks for the existence of the objects

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
244
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Vishal Gupta
Publisher
πŸ“ˆ
97%
Success Rate