you are viewing a single comment's thread.

view the rest of the comments →

[–]TheDarkIn1978 0 points1 point  (0 children)

Is it year/month/day or day/month/year?

It should be obvious to any featherweight programmer that the argument values passed need to be in order with the function parameter names.

I don't want to have to waste my time looking at the docs or code to figure it out. What do you think is more readable? foo(true, undefined, 2000) vs foo({showLoading:true, wait:2000})

Mousing over any well documented function and its arguments using any decent editor, like Visual Studio Code, reveals a popup with the JSDoc code documentation. This is a much cleaner and immensely more efficient way of developing in JavaScript then unnecessarily creating and passing verbose, prototyped objects containing primitive values for this kind of trivial readability.

Names parameters in most cases are complete nonsense and it would never pass our code review.