{"width":"100%","title":" javascript\u306eswitch\u6587\u3067\u6b63\u898f\u8868\u73fe","provider_url":"https://hatena.blog","provider_name":"Hatena Blog","author_url":"https://blog.hatena.ne.jp/IT7C/","url":"https://it7c.hatenadiary.org/entry/20160107/1452131133","blog_url":"https://it7c.hatenadiary.org/","version":"1.0","categories":["javascript"],"published":"2016-01-07 10:45:33","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fit7c.hatenadiary.org%2Fentry%2F20160107%2F1452131133\" title=\" javascript\u306eswitch\u6587\u3067\u6b63\u898f\u8868\u73fe - \u30a4\u30ce\u30d9\u30fc\u30c8\u306a\u975e\u65e5\u5e38\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","image_url":null,"height":"190","blog_title":"\u30a4\u30ce\u30d9\u30fc\u30c8\u306a\u975e\u65e5\u5e38","author_name":"IT7C","description":"\u3050\u3050\u308b\u3068\u6ca2\u5c71\u3067\u3066\u304f\u308b\u3051\u3069\u3001 Javascript\u306eswitch\u6587\u3067\u6b63\u898f\u8868\u73fe\u3092\u4f7f\u3046 - Qiita \u4ffa\u304c\u6c42\u3081\u3066\u3044\u308b\u306e\u306f\u3053\u308c\u3058\u3083\u306a\u3044\u3002 \u6b63\u898f\u8868\u73feonly\u306acase\u306a\u3089\u3053\u308c\u3067\u3044\u3044\u304c url='http://example.com/info.php'; with(url.compare){switch(url){ case 'http://example.com/': console.log('\u5b8c\u5168\u4e00\u81f4') break; case startsWith('http://sample.com/'): console.log('\u524d\u65b9\u4e00\u81f4'); break; case endsWith('http://sa\u2026","type":"rich"}