What means this kind of expression with logics operators

0 javascript boolean-expression

I have an boolean expression in javascript and i don't know what it means.

a = (b === LEFT && -2 || b === RIGHT && 2 || 0)
Run Code Online (Sandbox Code Playgroud)

Please what does it mean ?

NoN*_*ble 5

The && is a hacky shortcut if:

if (B === LEFT) {
    a = -2;
} else if (B === RIGHT) {
    a = 2;
} else {
    a = 0;
}
Run Code Online (Sandbox Code Playgroud)