In the following code:
if (result = object.expensiveOperation()) { return result; }
What is the scope of the variable result?
result
Why does the assignment work without a var, let or const keyword?
var
let
const
Is this undefined behaviour?