Question: In performing logical binary operations such as '&&', 'II' we want to minimize the work the computer needs to do We do this by our

 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

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!