thanks Jay for the snippet and taking time for the explanation you have here.
PS: I like your solution also the return stack.length === 0
5 years ago, I feel the same thing about adding semi-colon everywhere but now I have been coding without it. This might be one of those preference just like spaces and tabs. We all use a build tool and small modules might help that we do not have to worry about ASI mistakes taking place.
If change of heart on this preference, a team can incorporate prettier and it will address semi-colon concerns easily.
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.
thanks Jay for the snippet and taking time for the explanation you have here.
PS: I like your solution also the
return stack.length === 0
5 years ago, I feel the same thing about adding semi-colon everywhere but now I have been coding without it. This might be one of those preference just like spaces and tabs. We all use a build tool and small modules might help that we do not have to worry about ASI mistakes taking place.
If change of heart on this preference, a team can incorporate prettier and it will address semi-colon concerns easily.