What do two ampersands separating function calls do? Note: this is OUTSIDE any if statement or case statement
Like so:
functionCallOne() && functionCallTwo();
it is equivalent to
if ( functionCallOne() ) { functionCallTwo(); }
it just uses the short circuiting to make this 3 liner only take up one line
2.1m questions
2.1m answers
60 comments
57.0k users