<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>deloreanmc12</author_name>
  <author_url>https://blog.hatena.ne.jp/deloreanmc12/</author_url>
  <blog_title>3流プログラマのメモ書き</blog_title>
  <blog_url>https://3ryupg.hatenablog.com/</blog_url>
  <categories>
    <anon>Webがらみ</anon>
  </categories>
  <description>空文字判定を行う簡単な方法ですが、JavaScriptでは if 分の中で、空文字を評価すると false になります。 ということで、下記だけで判定が可能です。 var str=&quot;&quot;; if ( str ){ alert(&quot;空文字でない&quot;); }else{ alert(&quot;空文字である&quot;); } ちなみに、[JavaScript] オブジェクトがnullやundefindでないか評価する。 - うなの日記 を参考にさせてもらったところ、値ごとでifの評価をすると以下のようになるようです。 値 :ifで評価した結果 Object :true undefined:false null :false…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2F3ryupg.hatenablog.com%2Fentry%2F2012%2F11%2F11%2F003800&quot; title=&quot;(JavaScript)空文字判定を行う簡単な方法 - 3流プログラマのメモ書き&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>2012-11-11 00:38:00</published>
  <title>(JavaScript)空文字判定を行う簡単な方法</title>
  <type>rich</type>
  <url>https://3ryupg.hatenablog.com/entry/2012/11/11/003800</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
