<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>torikatsu923</author_name>
  <author_url>https://blog.hatena.ne.jp/torikatsu923/</author_url>
  <blog_title>torikatsu.dev</blog_title>
  <blog_url>https://torikatsu923.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>こんにちは、とりかつです。 最近、Javascriptで以下のようなコードを見かけました。 (function() { console.log(&quot;hogehoge&quot;); })(); 調べていくとこれはどうやら即時実行関数式(IIFE: Immediately Invoked Function Expression)[^1]というものだそうです。 私はぱっと見でIIFEの書き方が理解できませんでした。 なので、今回の記事ではこのIIFEを完全に理解したいと思います。 原点回帰 最初に関数の定義について振り返ります。 JSで関数式は以下のように定義, 実行できます。 // 関数の定義 var a …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftorikatsu923.hatenablog.com%2Fentry%2F2020%2F11%2F19%2F224003&quot; title=&quot;JavascriptのIIFEについて考える - torikatsu.dev&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>https://cdn-ak.f.st-hatena.com/images/fotolife/t/torikatsu923/20201119/20201119203001.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2020-11-19 22:40:03</published>
  <title>JavascriptのIIFEについて考える</title>
  <type>rich</type>
  <url>https://torikatsu923.hatenablog.com/entry/2020/11/19/224003</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
