{"id":5418,"date":"2018-07-05T23:27:01","date_gmt":"2018-07-05T14:27:01","guid":{"rendered":"http:\/\/www.code-magagine.com\/?p=5418"},"modified":"2023-05-27T21:02:42","modified_gmt":"2023-05-27T12:02:42","slug":"%e3%80%90javascript%e3%80%91%e5%a4%89%e6%95%b0%e3%81%ae%e3%82%b9%e3%82%b3%e3%83%bc%e3%83%97%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6","status":"publish","type":"post","link":"http:\/\/www.code-magagine.com\/?p=5418","title":{"rendered":"\u3010JavaScript\u3011\u5909\u6570\u306e\u30b9\u30b3\u30fc\u30d7\u306b\u3064\u3044\u3066"},"content":{"rendered":"<p>JavaScript\u306e\u5909\u6570\u306e\u30b9\u30b3\u30fc\u30d7\u3068\u3057\u3066\u306f\u3001\u4e0b\u8a18\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u30b0\u30ed\u30fc\u30d0\u30eb\u30b9\u30b3\u30fc\u30d7<\/li>\n<li>\u30ed\u30fc\u30ab\u30eb\u30b9\u30b3\u30fc\u30d7\uff08\u300c\u95a2\u6570\u30b9\u30b3\u30fc\u30d7\u300d\u3068\u3082\u547c\u3070\u308c\u308b\u3002\uff09<\/li>\n<li>\u30d6\u30ed\u30c3\u30af\u30b9\u30b3\u30fc\u30d7(ECMA2015\u3088\u308a\u8ffd\u52a0\u3055\u308c\u305f\u30b9\u30b3\u30fc\u30d7)<\/li>\n<\/ul>\n<h2>\u30b0\u30ed\u30fc\u30d0\u30eb\u30b9\u30b3\u30fc\u30d7<\/h2>\n<p><span style=\"color: #ff0000;\"><strong>\u30b9\u30af\u30ea\u30d7\u30c8\u5168\u4f53\u304b\u3089<\/strong><\/span>\u53c2\u7167\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>\u30b0\u30ed\u30fc\u30d0\u30eb\u5909\u6570<\/h3>\n<p>\u30b0\u30ed\u30fc\u30d0\u30eb\u30b9\u30b3\u30fc\u30d7\u3092\u6301\u3064\u5909\u6570\u306e\u3053\u3068\u3067\u3059\u3002\u8981\u306f\u3001<span style=\"color: #ff0000;\"><strong>\u57fa\u672c\u7684\u306b\u306f\u95a2\u6570\u306e\u5916\u3067\u5b9a\u7fa9\u3057\u305f\u5909\u6570\u306e\u3053\u3068<\/strong><\/span>\u3067\u3059\u3002<\/p>\n<h3>\u30b0\u30ed\u30fc\u30d0\u30eb\u30b9\u30b3\u30fc\u30d7\u306e\u6ce8\u610f\u70b9<\/h3>\n<p><span style=\"color: #ff0000;\"><strong>\u4ed6\u306e\u958b\u767a\u8005\u3084\u4ed6\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3068\u5909\u6570\u540d\u304c\u91cd\u306a\u3063\u3066\u3057\u307e\u3046\u3068\u8aa4\u52d5\u4f5c\u306e\u539f\u56e0\u306b\u306a\u308a\u307e\u3059\u3002<\/strong><\/span>\u3069\u3046\u3057\u3066\u3082\u30b0\u30ed\u30fc\u30d0\u30eb\u30b9\u30b3\u30fc\u30d7\u3058\u3083\u306a\u3044\u3068\u5b9f\u73fe\u3067\u304d\u306a\u3044\u3068\u3044\u3046\u5834\u5408\u3092\u9664\u304d\u3067\u304d\u308b\u3060\u3051\u30ed\u30fc\u30ab\u30eb\u30b9\u30b3\u30fc\u30d7\u3092\u4f7f\u3046\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>\u30ed\u30fc\u30ab\u30eb\u30b9\u30b3\u30fc\u30d7\uff08\u300c\u95a2\u6570\u30b9\u30b3\u30fc\u30d7\u300d\u3068\u3082\u547c\u3070\u308c\u308b\u3002\uff09<\/h2>\n<p><span style=\"color: #ff0000;\"><strong>\u5b9a\u7fa9\u3055\u308c\u305f\u95a2\u6570\u306e\u4e2d\u3067\u306e\u307f<\/strong><\/span>\u53c2\u7167\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u8981\u306f\u3001<span style=\"color: #ff0000;\"><strong>\u57fa\u672c\u7684\u306b\u306f\u95a2\u6570\u306e\u4e2d\u3067\u5b9a\u7fa9\u3057\u305f\u5909\u6570\u306e\u3053\u3068\uff08\u5f8c\u8ff0\u3059\u308b\u3088\u3046\u306a\u4f8b\u5916\u306f\u3042\u308a\u307e\u3059\u3002\uff09<\/strong><\/span>\u3067\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u95a2\u6570\u306e\u5f15\u6570\u81ea\u4f53\u3082\u3001\u30ed\u30fc\u30ab\u30eb\u30b9\u30b3\u30fc\u30d7\u3067\u3042\u308b<span style=\"color: #ff0000;\"><strong>\u300c\u30ed\u30fc\u30ab\u30eb\u5909\u6570\u300d\u306e\u6271\u3044<\/strong><\/span>\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h3>\u30ed\u30fc\u30ab\u30eb\u5909\u6570<\/h3>\n<p>\u30ed\u30fc\u30ab\u30eb\u30b9\u30b3\u30fc\u30d7\u3092\u6301\u3064\u5909\u6570\u306e\u3053\u3068\u3067\u3059\u3002<\/p>\n<h2>\u300c\u30b0\u30ed\u30fc\u30d0\u30eb\u5909\u6570\u300d\u3068\u300c\u30ed\u30fc\u30ab\u30eb\u5909\u6570\u300d\u306e\u4f7f\u3044\u5206\u3051\u306e\u4f8b<\/h2>\n<pre class=\"lang:default decode:true\">var global = '\u30b0\u30ed\u30fc\u30d0\u30eb\u5909\u6570\u3067\u3059';\r\n\r\nfunction test(){\r\n  var local = '\u30ed\u30fc\u30ab\u30eb\u5909\u6570\u3067\u3059\u3002';\r\n}<\/pre>\n<p>\u306a\u304a\u3001<span style=\"color: #ff0000;\"><strong>var\u547d\u4ee4\u3092\u3057\u306a\u304b\u3063\u305f\u5834\u5408\u306f\u3001\u4f8b\u5916\u306a\u304f\u300c\u30b0\u30ed\u30fc\u30d0\u30eb\u5909\u6570\u300d\u306b\u306a\u3063\u3066\u3057\u307e\u3046\u306e\u3067\u3001\u5c11\u306a\u304f\u3068\u3082\u5fc5\u305a\u30ed\u30fc\u30ab\u30eb\u5909\u6570\u306b\u306fvar\u547d\u4ee4\u3092\u4ed8\u3051\u308b<\/strong><\/span>\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>\u300c\u30ed\u30fc\u30ab\u30eb\u5909\u6570\u300d\u4f7f\u7528\u6642\u306e\u6ce8\u610f\u70b9<\/h2>\n<pre class=\"lang:default decode:true\">var hensu = '\u30b0\u30ed\u30fc\u30d0\u30eb\u5909\u6570\u3067\u3059';\r\n\r\nfunction test(){\r\n  console.log(hensu);\r\n  var hensu = '\u30ed\u30fc\u30ab\u30eb\u5909\u6570\u3067\u3059\u3002';\r\n}<\/pre>\n<p>\u4e0a\u8a18\u306e\u3088\u3046\u306a\u5834\u5408\u306f\u3001\u51fa\u529b\u7d50\u679c\u306f\u3001<span style=\"color: #ff0000;\"><strong>\u300c\u30b0\u30ed\u30fc\u30d0\u30eb\u5909\u6570\u3067\u3059\u300d\u3067\u306f\u306a\u304f\u3001\u300cundefined(\u672a\u5b9a\u7fa9)\u300d<\/strong><\/span>\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u306f\u3001test\u95a2\u6570\u5185\u3067\u3001\u5f8c\u308d\u306e\u65b9\u306bvar\u3067\u300c\u30ed\u30fc\u30ab\u30eb\u5909\u6570\u300d\u306e\u5b9a\u7fa9\u304c\u3055\u308c\u3066\u304a\u308a\u3001\u95a2\u6570\u5168\u4f53\u3067\u6709\u52b9\u306b\u306a\u3063\u3066\u3057\u307e\u3063\u3066\u3044\u308b\u305f\u3081\u3067\u3059\u3002\u305f\u3060\u3001\u307e\u3060\u4ee3\u5165\u306f\u3055\u308c\u3066\u3044\u306a\u3044\u305f\u3081\u3001\u300cundefined\u300d\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u306a\u306e\u3067\u3001<span style=\"color: #ff0000;\"><strong>\u30ed\u30fc\u30ab\u30eb\u5909\u6570\u3092\u5b9a\u7fa9\u3059\u308b\u969b\u306f\u3001\u5fc5\u305a\u95a2\u6570\u306e\u5148\u982d\u3067\u5b9a\u7fa9<\/strong><\/span>\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>\u30d6\u30ed\u30c3\u30af\u30b9\u30b3\u30fc\u30d7(ECMA2015\u3088\u308a\u8ffd\u52a0\u3055\u308c\u305f\u30b9\u30b3\u30fc\u30d7)<\/h2>\n<p>Java\u7b49\u306e\u8a00\u8a9e\u3067\u3082\u305d\u3046\u3067\u3059\u304c\u3001if\u30d6\u30ed\u30c3\u30af\u3084\u3001for\u30d6\u30ed\u30c3\u30af\u306e\u4e2d\u3060\u3051\u3067\u6709\u52b9\u306a\u30b9\u30b3\u30fc\u30d7\u3092\u6301\u3064\u5909\u6570\u304cJavaScript\u3067\u3082\u5b9a\u7fa9\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u4eca\u307e\u3067\u306f\u3001JavaScript\u3067\u306f\u3001\u305d\u306e\u3088\u3046\u306a\u6a5f\u80fd\u306f\u3042\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"JavaScript\u306e\u5909\u6570\u306e\u30b9\u30b3\u30fc\u30d7\u3068\u3057\u3066\u306f\u3001\u4e0b\u8a18\u304c\u3042\u308a\u307e\u3059\u3002 \u30b0\u30ed\u30fc\u30d0\u30eb\u30b9\u30b3\u30fc\u30d7 \u30ed\u30fc\u30ab\u30eb\u30b9\u30b3\u30fc\u30d7\uff08\u300c\u95a2\u6570\u30b9\u30b3\u30fc\u30d7\u300d\u3068\u3082\u547c\u3070\u308c\u308b\u3002\uff09 \u30d6\u30ed\u30c3\u30af\u30b9\u30b3\u30fc\u30d7(ECMA2015\u3088\u308a\u8ffd\u52a0\u3055\u308c\u305f\u30b9\u30b3\u30fc\u30d7) \u30b0\u30ed\u30fc\u30d0\u30eb\u30b9\u30b3\u30fc\u30d7 \u30b9\u30af [&hellip;]","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[16],"tags":[],"_links":{"self":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/5418"}],"collection":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5418"}],"version-history":[{"count":14,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/5418\/revisions"}],"predecessor-version":[{"id":20305,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/5418\/revisions\/20305"}],"wp:attachment":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5418"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5418"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5418"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}