3 ms·
The issue is in an expression like "out = foo?.bar()". What I want is to only assign to out if foo exists, but the compiler has no way of knowing that-- it'll e
by Cushman 15y ago
The issue is in an expression like "out = foo?.bar()". What I want is to only assign to out if foo exists, but the compiler has no way of knowing that-- it'll evaluate to undefined instead. In this situation I need to use "out = foo.bar() if foo".
That's easy enough to remember, though.