<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>tomoyuki_en</author_name>
  <author_url>https://blog.hatena.ne.jp/tomoyuki_en/</author_url>
  <blog_title>ともブロ。</blog_title>
  <blog_url>https://tomoyuki-en.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>JSのswitch文についてのメモ。 条件分岐というと、通常if文が用いられているが、switch文を用いた方がスマートに見える場合も多い。 使用例として、今回は３色(金銀白)おみくじで使用してみる。 例１ const omikuji = &quot;silver&quot;; switch(omikuji) { case &quot;gold&quot;: console.log(&quot;世界一周旅行券&quot;) break; case &quot;silver&quot;: console.log(&quot;世界一周旅行券&quot;) break; case &quot;white&quot;: console.log(&quot;ティッシュ&quot;) break; if文を使うと以下の通り 例２ if (om…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftomoyuki-en.hatenablog.com%2Fentry%2F2021%2F05%2F06%2F201038&quot; title=&quot;【JavaScript】switch文による条件分岐について - ともブロ。&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>2021-05-06 20:10:38</published>
  <title>【JavaScript】switch文による条件分岐について</title>
  <type>rich</type>
  <url>https://tomoyuki-en.hatenablog.com/entry/2021/05/06/201038</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
