<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>dogwood008</author_name>
  <author_url>https://blog.hatena.ne.jp/dogwood008/</author_url>
  <blog_title>dogwood008の開発メモ！</blog_title>
  <blog_url>https://blog.dogwood008.com/</blog_url>
  <categories>
    <anon>JavaScript</anon>
  </categories>
  <description>要旨 ['a', undefined, 1, null].filter(Boolean) // =&gt; ['a', 1] 詳細 filter の構文は、次のようになっている。 let newArray = arr.filter(callback(element[, index, [array]])[, thisArg]) この時、 callback に Boolean を指定すると、 Boolean(element, index, array) が呼ばれることになる。 ここで、 Boolean のコンストラクタに着目する。 Boolean は引数を1つしか取らない。JSは、仮引数で定義された個数…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.dogwood008.com%2Fentry%2Fjs-filter-boolean&quot; title=&quot;【JavaScript】filterでfalsyな値を取り除くには、Array.prototype.filter(Boolean)で良い - dogwood008の開発メモ！&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>2022-07-02 23:37:41</published>
  <title>【JavaScript】filterでfalsyな値を取り除くには、Array.prototype.filter(Boolean)で良い</title>
  <type>rich</type>
  <url>https://blog.dogwood008.com/entry/js-filter-boolean</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
