DEV Community

loading...

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

Collapse
techygeeky profile image
Kapil Raghuwanshi🖥 Author

Thanks @manoharreddyporeddy . Astonishing Idea of GitHub. Will create the repo and update the link in the post itself for further collaboration.

Nevertheless, what error are you pointing out in above snippet?

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🖥 Author

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.