<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>tokitashi</author_name>
  <author_url>https://blog.hatena.ne.jp/tokitashi/</author_url>
  <blog_title>kshun技術のーと</blog_title>
  <blog_url>https://tokitashi.hatenablog.com/</blog_url>
  <categories>
    <anon>javascript</anon>
  </categories>
  <description>内容 以下のswitch文をリファクタリングすること。 冗長で拡張性が低い。 // カードの値を数字に変換する function switchToValue(card) { switch(card) { case &quot;A&quot;: card = 1; break; case &quot;J&quot;: card = 11; break; case &quot;Q&quot;: card = 12; break; case &quot;K&quot;: card = 13; break; } return card; } 修正案 ポイント: オブジェクトを使用してカードの値を変換する。 function switchToValue(card) { const …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftokitashi.hatenablog.com%2Fentry%2F2023%2F07%2F15%2F210307&quot; title=&quot;【リファクタリングメモ】vol.3  -JavaScript - - kshun技術のーと&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>2023-07-15 21:03:07</published>
  <title>【リファクタリングメモ】vol.3  -JavaScript -</title>
  <type>rich</type>
  <url>https://tokitashi.hatenablog.com/entry/2023/07/15/210307</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
