What Is The Difference Between The Two Lines In The Following #131
What is the difference between the two lines in the following JavaScript code?</p> <pre><code class="language-javascript"> !!(obj1 && obj2); (obj1 && obj2); </code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs106 Javascript. It can also be found in gs gs106 Lexical Structures - JavaScript Functions and Functional Programming - Quiz No.1.
What is the difference between the two lines in the following JavaScript code?
!!(obj1 && obj2); (obj1 && obj2);
Both the lines result in a boolean value “True”
Both the lines result in a boolean value “False”
Both the lines check just for the existence of the object alone
The first line results in a real boolean value whereas the second line merely checks for the existence of the objects
Similar question(s) are as followings:
Online Quizzes of gs106 Javascript
Graphics and Rendering in JavaScript - Scripted Media - Quiz No.1
gs gs106 Javascript
Online Quizzes