<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kasei_san</author_name>
  <author_url>https://blog.hatena.ne.jp/kasei_san/</author_url>
  <blog_title>かせいさんとこ</blog_title>
  <blog_url>https://kasei-san.hatenadiary.org/</blog_url>
  <categories>
    <anon>javascript</anon>
  </categories>
  <description>クロージャって何ぞ？ メソッドが実行されるときに、メソッド内に参照する変数が無い場合、そのメソッドの呼び出し元ではなく、宣言を行ったスコープの変数を参照する仕組み具体的には &lt;script&gt; (function(){ var divs = $T(&quot;div&quot;); // divタグのDOMを全て取得 for(var i=0,l=divs.length; i&lt;l; i++){ divs[i].addEventListner( 'click', function(e){ alert(i); } ); } })(); &lt;/script&gt; &lt;div&gt;0&lt;/div&gt; &lt;div&gt;1&lt;/div&gt; &lt;div&gt;2&lt;…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkasei-san.hatenadiary.org%2Fentry%2F20090520%2Fp1&quot; title=&quot;クロージャがやっとこさ理解できたのでまとめ - かせいさんとこ&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>2009-05-20 00:00:00</published>
  <title>クロージャがやっとこさ理解できたのでまとめ</title>
  <type>rich</type>
  <url>https://kasei-san.hatenadiary.org/entry/20090520/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
