<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>shinshin86</author_name>
  <author_url>https://blog.hatena.ne.jp/shinshin86/</author_url>
  <blog_title>at backyard</blog_title>
  <blog_url>https://shinshin86.hateblo.jp/</blog_url>
  <categories>
    <anon>JavaScript</anon>
    <anon>備忘録</anon>
  </categories>
  <description>例えばこんな文字列を出力したいとする。 const isInvalid = true; `is invalid: ${isInvalid ? true : false}` 結果は下記のような文字列となる。 is invalid: true だが、下記のようにすると、結果は true となる。 const isInvalid = true; &quot;is invalid: &quot; + isInvalid ? true : false // true 例えば下記のように文字列とbooleanを + で足しても文字列とbool値が結合されて出てくるので、一瞬上の挙動はおかしいのでは？と錯覚するが、 &quot;is i…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fshinshin86.hateblo.jp%2Fentry%2F2022%2F09%2F04%2F071547&quot; title=&quot;JavaScriptの三項演算子に関する、どうでもいいメモ書き - at backyard&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-09-04 07:15:47</published>
  <title>JavaScriptの三項演算子に関する、どうでもいいメモ書き</title>
  <type>rich</type>
  <url>https://shinshin86.hateblo.jp/entry/2022/09/04/071547</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
