<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>terurou</author_name>
  <author_url>https://blog.hatena.ne.jp/terurou/</author_url>
  <blog_title>terurouメモ</blog_title>
  <blog_url>https://terurou.hateblo.jp/</blog_url>
  <categories>
    <anon>JavaScript</anon>
  </categories>
  <description>jQueryのソース読んでて、三項演算子とかswitch文とかの代替になるキモいコードの書き方をしてるところをみつけた。世間じゃ有名なのかもしれないけど、自分は知らなかったんでメモしとく。こういうのとか var hoge = &quot;適当な値&quot;; var result = (hoge == &quot;適当な評価式&quot;) ? &quot;hoge&quot;: &quot;fuga&quot;; こういうのが var hoge = &quot;適当な値&quot;; var result; switch(hoge) { case &quot;aaa&quot;: result = &quot;aaa&quot;; break; case &quot;bbb&quot;: result = &quot;bbb&quot;; break; case &quot;…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fterurou.hateblo.jp%2Fentry%2F20071202%2F1196602650&quot; title=&quot;三項演算子とかswitch文とかの代替になるコードの書き方 - terurouメモ&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>2007-12-02 22:37:30</published>
  <title>三項演算子とかswitch文とかの代替になるコードの書き方</title>
  <type>rich</type>
  <url>https://terurou.hateblo.jp/entry/20071202/1196602650</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
