## Solution:

Your confusion all comes down to a misunderstanding of precedence.

A mathematical analogue could be "0 multiplied by anything equals 0." Consider the following expression below:

`0 x 100 + 5`

In any programming language, or a decent calculator, this evaluates to 5. The "0 times anything" axiom is true - however the "anything" in this case is `100`

, NOT `100 + 5`

! For viewing why, compare it to this:

`5 + 0 x 100`

It doesn't matter whether you include the 5 at the beginning or the end - the operator precedence rules remove ambiguity from the statement.

In JavaScript boolean logic, `&&`

has higher precedence than `||`

. Because each operator is commutative, writing

`false && true || true`

is exactly the same as writing

`true || false && true`

You are looking at precedence wrong.

&& is done first, then || so what it looks like is how you wrote it:

`(false && true) || true`

So the MDN link is correct.

The language performs by parsing an expression into abstract syntax tree. This expression `false && true || true`

gets parsed into like this:

```
||
/ \
&& true
/ \
false true
```

Just *after* building the AST, the short-circuited evaluation can take place.

The false && anything is short-circuit appraised to false.

quote applies just to a sound sub-tree where `false`

and `anything`

are subtrees of `&&`

node, :

```
&&
/ \
false true
```

which meansrefers just the `false && true`

gets short-ciruit appraised to `false`

and resulting `false || true`

is evaluated to `true`

JavaScript will parse this expression :

```
1) false && true //evaluates to false
2) false || true //equals true. The first false is the result above
```

It's simple to find how JavaScript parse this whole expression :

```
(function(){alert(1); return false; })() &&
(function(){alert(2); return true; })() ||
(function(){alert(3); return true; })()
```