0

Named parameters (i.e. fnCall(x = "something")) are very useful for visually verifying you are passing the correct item in the correct spot (among other reasons to use them.)

JS doesn't natively support them. This article already covers the work arounds, what I'm curious is why JS doesn't support name parameters? (when most? other programming languages seem to)

Bergi
  • 630,263
  • 148
  • 957
  • 1,375
oooiiiii
  • 302
  • 2
  • 11
  • 1
    Here is a discussion from 4 years ago: https://esdiscuss.org/topic/named-paramters – Evert Feb 07 '19 at 20:22
  • 3
    "*most other programming languages seem to*" - [citation needed] – Bergi Feb 07 '19 at 20:30
  • 1
    https://blogs.msdn.microsoft.com/ericlippert/2009/06/22/why-doesnt-c-implement-top-level-methods/ –  Feb 07 '19 at 20:35

0 Answers0