0
0

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.

アロー関数②

Posted at

通常の関数


function namefunc(aro1) {
    console.log(aro1);

}

アロー関数

const arrowfunc(aro2) {
    console.log(aro2);
}

ワンラインのアロー関数


const arrow_func(aro3) => console.log(aro3)
}

関数実行


namefunc('通常の関数');
arrowfunc('アロー関数');
arrow_func('1行のアロー関数 ');


const users = {
    hoge: "yamatetsu";
}

const getUsername = (userId) => users[userId];

const username = getUsername('hoge')
console.log(username)

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?