Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database 11g SQL

Authors: Jason Price

1st Edition

0071498508, 978-0071498500

More Books

Students also viewed these Databases questions