DEV Community

Discussion on: Top 20 JavaScript tips and tricks to increase your Speed and Efficiency

Collapse
 
manoharreddyporeddy profile image
Manohar Reddy Poreddy
return temp > 97 ? 'Visit Doctor!'
      : temp < 97 ? 'Feel Better!'
      : temp === 97 ? 'Take Some Rest!'
      : 'Go Out and Play!';
Enter fullscreen mode Exit fullscreen mode

can be

return temp > 97 ? 'Visit Doctor!'
      : temp < 97 ? 'Feel Better!'
      : 'Take Some Rest!' ;
Enter fullscreen mode Exit fullscreen mode

OR

return temp > 97 ? 'Visit Doctor!'
      : temp < 97 ? 'Feel Better!'
      : 'Go Out and Play!';
Enter fullscreen mode Exit fullscreen mode

Reason is a number can only be < or > or === 97.
There can't be a 4th option.

Hope it's clear now.
Will wait for your github link.

Thread Thread
 
techygeeky profile image
Kapil Raghuwanshi🖥

Oh I got that one now! Updated.

Here is the link for the GitHub repo, github.com/kapilraghuwanshi/quick-.... Need to finalize the repo structure and PR etc, if you have suggestions please add to that repo.