1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

JavaScript stage 0,1,2,3Advent Calendar 2015

Day 3

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?