DEV Community

Discussion on: How would you refactor this JS function?

Collapse
 
jamesthomson profile image
James Thomson

When using the early return method, you don't need else if. Just use if.