Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

関数と宣言: Arrow Functionの名前について #1285

Open
azu opened this issue Jan 26, 2021 · 1 comment
Open

関数と宣言: Arrow Functionの名前について #1285

azu opened this issue Jan 26, 2021 · 1 comment

Comments

@azu
Copy link
Collaborator

azu commented Jan 26, 2021

URL : https://github.com/asciidwango/js-primer/blob/master/source/basic/function-declaration/README.md

名前をつけることができない(常に匿名関数)
📝 https://github.com/asciidwango/js-primer/blob/master/source/basic/function-declaration/README.md#L522

const a = () => {} は仕様に、a.name も取れるので、名前をつけることはできないというのは微妙なのかも。
スタックトレース的にも変数名が名前にはなるので、

常に匿名関数

だけでもよさそう。

@azu
Copy link
Collaborator Author

azu commented Jan 30, 2021

関数名 - 利用できる名前は変数名と同じ(「変数名に使える名前のルール」を参照)

と対なのかな

@azu azu changed the title 関数と宣言: Arrow Function 関数と宣言: Arrow Functionの名前について Jan 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant