In performing logical binary operations such as II we want
In performing logical binary operations such as \'&&\', \'II\' we want to minimize the work the computer needs to do We do this by our operations in JavaScript we allow for many typed values to be operated on logically (using these operators). Let us consider the concept of \"truthy\" and \'falsely\' values Generally truthy is any non 0 value while falsely is a 0 value We then note that truthy || truthy is truthy truthy || falsie is truthy so more generally truthy || e2 is Sort of like how true || x = true regardless of the value of This becomes interesting when considering the evaluation of expressions such as: 2 0 || console log (\'hello\') This expression evaluates to This expression prints to the output stream. Note that printing is an example of a
Solution
1. Short Circuiting Becaus eshort circuiting helps in minimize the given logoc operations.
2. truthly, because when truthly is || by any value the result will be truthly
3. x, Just like above regardless of value of x result will be true.
4. 2.0 because consol log (\"hello\") will return 1
5. \"hello\" In output stream hello will be printd
6. nothing
