<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>panda_noir</author_name>
  <author_url>https://blog.hatena.ne.jp/panda_noir/</author_url>
  <blog_title>Panda Noir</blog_title>
  <blog_url>https://www.pandanoir.info/</blog_url>
  <categories>
    <anon>JavaScript</anon>
  </categories>
  <description>結論: (トップレベルで関数を宣言するときに限り)function かアロー関数かは好みの問題。 アロー関数が出てきた当初と状況が変わってきた www.pandanoir.info 2016年に「function よりアロー関数を使うべき(function は適切な場面でのみ使うべき)」という記事(↑)を書きました。それから年数が経って状況が変わったので改めて2023年現在の意見を書こうと思います。 おさらい: function は役割が4つある function は呼び出し方によって役割が異なります。以下の4つが function の呼び出し方です。 関数として クラスのコンストラクタとして…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.pandanoir.info%2Fentry%2F2023%2F02%2F24%2F081511&quot; title=&quot;関数はアロー関数と function どちらで書くべきなのか？ - Panda Noir&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2023-02-24 08:15:11</published>
  <title>関数はアロー関数と function どちらで書くべきなのか？</title>
  <type>rich</type>
  <url>https://www.pandanoir.info/entry/2023/02/24/081511</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
