LoginSignup
1
1

More than 5 years have passed since last update.

Trailing commas in function parameter lists and calls

Posted at

Trailing commas in function parameter lists and calls

いわゆるケツカンマ付きで関数呼び出しと関数の引数定義ができるというもの。

Trailing commas in function parameter lists and calls

ちなみに執筆当時はstage3

これからは

function foo(
  param1, 
  param2, 
  param3, // ケツカンマOK
) {
  // ...
}

foo(bar, baz, qux,); // ここでもケツカンマOK

(正直これより JSON ケツカンマ許してほしい)

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1