DEV Community

Discussion on: How would you refactor this JS function?

Collapse
 
siddharthshyniben profile image
Siddharth

I'd suggest putting the line argument in the function first, as line is more important and isFirstLine can have a default value

Thread Thread
 
rkallan profile image
RRKallan

true i just copy paste it and didn't read the arguments.