@pho
Nothing here yet.
Nothing here yet.
No blogs yet.
One major benefit of trailing commas is that they play well with version control. E.g. let's say you have the following array: const myArray = [ 1 , 2 , ]; Later, you like to add an additional element: const myArray = [ 1 , 2 , 3 , ]; Then, the diff file looks as follows: const myArray = [ 1 , 2 , + 3 , ]; And not: const myArray = [ 1, - 2 + 2, + 3 ]; Which IMHO is much less descriptive.
Right to the point - it all comes down to different levels of abstraction (and that's what computer science is [all] about). Moreover, I'd like to contradict the narrative that jQuery shields from learning JS. It's the browser API (aka DOM), not the language, which is wrapped - an important distinction imho.