0
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 1 year has passed since last update.

ES6についての備忘録

0
Posted at

最近ES6の記法を使うようになったのでその備忘録

変数定義

varからconstとletに
constは再代入不可、letは再代入可

// 今までの変数定義
var test = "test";

// ES6での書き方
const test = "test";
test = "update test";
↑これはできないのでエラーになる

let test = "test";
test = "updaete test";
↑これはできる

アロー関数

functionの代わりに=>で書けるようになった

var func = (arg1, arg2) => { return arg1 + arg2; }

Scalaで省略記法に慣れていたので、記述量が減って少し楽になった

0
1
1

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