0
0

More than 1 year has passed since last update.

arrow関数で名前付きの即時関数の書き方

Last updated at Posted at 2021-10-28

やりたいこと

var result = (function (param1, param2) {
  return param1 + param2;
}(1, 2));

みたいな感じで、名前付きで即時関数をarrowで書きたかった

方法

const result = ((param1, param2) => {
  return param1 + param2;
})(1,2);

これでいけました。

0
0
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
0
0