DEV Community

Discussion on: Change your old methods for writing a JavaScript Code - Shorthand's for JavaScript Code

Collapse
 
dmk1111 profile image
dmk1111
  1. in suggested option console.log will still fire with undefined but with if case it won't fire;
  2. works in this particular case. In case you have to return default value it won't work