Is there a reason though?🤔
the reason was to mimic Go... after switching between JavaScript and Go projects, I felt the need to try to write in a similar way in JavaScript :P
I got that - sorry if I wasn't clear enough, let me rephrase my question:
Is there a reason to go for a return that can be destructered as [err, value] over one that would be destructered with [value, err]?
I hope I made it understandable now.😇
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Is there a reason though?🤔
the reason was to mimic Go... after switching between JavaScript and Go projects, I felt the need to try to write in a similar way in JavaScript :P
I got that - sorry if I wasn't clear enough, let me rephrase my question:
Is there a reason to go for a return that can be destructered as [err, value] over one that would be destructered with [value, err]?
I hope I made it understandable now.😇