We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
typeof
function
文中で、JavaScript のデータ型について以下のように説明しており、ここを読んだ段階では、読者は関数 (function) を typeof 演算子で評価した結果として object が返ることを期待すると思います。
object
js-primer/source/basic/data-type/README.md
Lines 25 to 37 in 25089ae
しかし、そのすぐ下の typeof 演算子を使った確認では、評価結果として function が返る例が示されています。
Lines 44 to 55 in 25089ae
console.log(typeof function() {}); // => "function"
ただしその後も typeof 演算子の評価結果としての function についての言及はないため、どこかでこの結果について補足するのはいかがでしょうか。 詳細に入りすぎても混乱すると思うので、コラム的に言及するのみで良いとは思います。
MDN の解説を参照するだけでも良いかと思いましたが、初学者はかえって混乱すると思ったので、できれば文中で補足があるとありがたいと思いました。
ご検討よろしくお願いします。
以下のいずれかが反映される:
a. typeof 演算子で関数を評価すると function が返ることについて文中で補足する b. console.log(typeof function() {}); // => "function" の記述を消す c. function がかえる結果については深追いしないことを文中で明言する
自分で試した読者が混乱する・質問がくると思うので、a が望ましいとは思います。
The text was updated successfully, but these errors were encountered:
a. typeof 演算子で関数を評価すると function が返ることについて文中で補足する
関数も ここの流れに入れるのが自然な感じがしますね。 関数もオブジェクトですが、特別扱いされるので、プリミティブとオブジェクト(関数とその他)という感じで
データ型を細かく見ていくと、7つのプリミティブ型とオブジェクトからなります。
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
該当ページ
リクエスト/提案内容
文中で、JavaScript のデータ型について以下のように説明しており、ここを読んだ段階では、読者は関数 (function) を
typeof
演算子で評価した結果としてobject
が返ることを期待すると思います。js-primer/source/basic/data-type/README.md
Lines 25 to 37 in 25089ae
しかし、そのすぐ下の
typeof
演算子を使った確認では、評価結果としてfunction
が返る例が示されています。js-primer/source/basic/data-type/README.md
Lines 44 to 55 in 25089ae
ただしその後も
typeof
演算子の評価結果としての function についての言及はないため、どこかでこの結果について補足するのはいかがでしょうか。詳細に入りすぎても混乱すると思うので、コラム的に言及するのみで良いとは思います。
MDN の解説を参照するだけでも良いかと思いましたが、初学者はかえって混乱すると思ったので、できれば文中で補足があるとありがたいと思いました。
ご検討よろしくお願いします。
期待する結果
以下のいずれかが反映される:
a.
typeof
演算子で関数を評価するとfunction
が返ることについて文中で補足するb.
console.log(typeof function() {}); // => "function"
の記述を消すc.
function
がかえる結果については深追いしないことを文中で明言する自分で試した読者が混乱する・質問がくると思うので、a が望ましいとは思います。
The text was updated successfully, but these errors were encountered: