3 ms·
0 is falsy in javascript; with the second method, default_value will get used instead.
by 1wheel 13y ago
0 is falsy in javascript; with the second method, default_value will get used instead.
- elclanrs 13y agoI'd use: bar = bar != null ? bar : 'default';