Option A comes from the C tradition, that's what you find in the K&R.
I think option B came about with JavaScript. JS interpreters tend to automatically add a semi-colon at the end of each line unless there is a clear sign that it shouldn't (like an open brace signalling the start of a code block). Hence the new format. I'm not sure if that reason is still relevant today but by now it's standard in the JS world.
As for me I started with C/C++ and option A. After a long career break, I took up JavaScript and Node.js and switched to option B. It was weird at first but now it's second nature.
At the end of the day, what matters is that the team agrees on a common format. Or uses tools that automate formatting.
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.
Option A comes from the C tradition, that's what you find in the K&R.
I think option B came about with JavaScript. JS interpreters tend to automatically add a semi-colon at the end of each line unless there is a clear sign that it shouldn't (like an open brace signalling the start of a code block). Hence the new format. I'm not sure if that reason is still relevant today but by now it's standard in the JS world.
As for me I started with C/C++ and option A. After a long career break, I took up JavaScript and Node.js and switched to option B. It was weird at first but now it's second nature.
At the end of the day, what matters is that the team agrees on a common format. Or uses tools that automate formatting.