DEV Community

Discussion on: Improve your JS skills with those tips #1

Collapse
 
codeoz profile image
Code Oz

hey thanks for your comment, yes it's working in case of you only need to return something! If you add more logic in the if or after you cannot use ternary (unlike you create function).

The other point is about else if! If you need to have else if is more complicated!