LoginSignup
0

More than 3 years have passed since last update.

ES6で使えるアロー関数

Last updated at Posted at 2019-11-30

ES6から関数にアロー関数というものが使えるようになりました。
functionとかくよりシンプルです。

今まで

const hoge = function() {
  console.log("foobar");
}

ES6ではアロー関数で記述できる

const hoge = () => {
  console.log("foobar");
}

内容はいままでとかわりありません。

hoge();

呼び出し方も今までと同じです。

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