{"id":507,"date":"2026-07-08T20:23:01","date_gmt":"2026-07-08T11:23:01","guid":{"rendered":"https:\/\/www.marchboy.xyz\/wordpress\/archives\/507"},"modified":"2026-07-08T20:23:01","modified_gmt":"2026-07-08T11:23:01","slug":"javascript%e3%81%ae%e3%82%a2%e3%83%ad%e3%83%bc%e9%96%a2%e6%95%b0%e3%81%ae%e5%9f%ba%e7%a4%8e%e3%81%a8%e6%b4%bb%e7%94%a8","status":"publish","type":"post","link":"https:\/\/www.marchboy.xyz\/wordpress\/archives\/507","title":{"rendered":"JavaScript\u306e\u30a2\u30ed\u30fc\u95a2\u6570\u306e\u57fa\u790e\u3068\u6d3b\u7528"},"content":{"rendered":"<h2>\u30a2\u30ed\u30fc\u95a2\u6570\u3068\u306f<\/h2>\n<p>\u30a2\u30ed\u30fc\u95a2\u6570\u306f ECMAScript 6 (ES6) \u3067\u5c0e\u5165\u3055\u308c\u305f\u3001\u95a2\u6570\u3092\u7c21\u6f54\u306b\u8a18\u8ff0\u3067\u304d\u308b\u69cb\u6587\u3067\u3059\u3002\u5f93\u6765\u306e <strong>function<\/strong> \u5ba3\u8a00\u306b\u6bd4\u3079\u3066\u30b7\u30f3\u30bf\u30c3\u30af\u30b9\u304c\u77ed\u304f\u3001<strong>this<\/strong> \u304c\u30ec\u30ad\u30b7\u30ab\u30eb\u306b\u30d0\u30a4\u30f3\u30c9\u3055\u308c\u308b\u70b9\u304c\u7279\u5fb4\u3067\u3059\u3002<\/p>\n<h3>\u57fa\u672c\u69cb\u6587<\/h3>\n<pre><code>(\u5f15\u6570) => \u5f0f<\/code><\/pre>\n<p>\u5f15\u6570\u304c1\u3064\u3060\u3051\u306e\u5834\u5408\u306f\u4e38\u62ec\u5f27\u3092\u7701\u7565\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre><code>x => x * x<\/code><\/pre>\n<h3>\u30d6\u30ed\u30c3\u30af\u5f62\u5f0f\u306e\u95a2\u6570<\/h3>\n<p>\u8907\u6570\u884c\u306e\u51e6\u7406\u3084 <strong>return<\/strong> \u304c\u5fc5\u8981\u306a\u5834\u5408\u306f\u6ce2\u62ec\u5f27\u3067\u30d6\u30ed\u30c3\u30af\u3092\u56f2\u307f\u307e\u3059\u3002<\/p>\n<pre><code>const sum = (a, b) => {\n  const result = a + b;\n  return result;\n};<\/code><\/pre>\n<h2>\u30a2\u30ed\u30fc\u95a2\u6570\u3068 this \u306e\u95a2\u4fc2<\/h2>\n<p>\u901a\u5e38\u306e\u95a2\u6570\u306f\u547c\u3073\u51fa\u3057\u6642\u306e\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u306b\u5fdc\u3058\u3066 <strong>this<\/strong> \u304c\u6c7a\u307e\u308a\u307e\u3059\u304c\u3001\u30a2\u30ed\u30fc\u95a2\u6570\u306f\u5ba3\u8a00\u3055\u308c\u305f\u30b9\u30b3\u30fc\u30d7\u306e <strong>this<\/strong> \u3092\u305d\u306e\u307e\u307e\u5229\u7528\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u5185\u3067 <strong>this<\/strong> \u3092\u4fdd\u6301\u3057\u305f\u3044\u30b1\u30fc\u30b9\u3067\u4fbf\u5229\u3067\u3059\u3002<\/p>\n<pre><code>function Counter() {\n  this.count = 0;\n  setInterval(() => {\n    this.count++;\n    console.log(this.count);\n  }, 1000);\n}\nnew Counter();<\/code><\/pre>\n<h2>\u4f7f\u3044\u3069\u3053\u308d\u3068\u6ce8\u610f\u70b9<\/h2>\n<ul>\n<li>\u77ed\u3044\u95a2\u6570\u3084\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u3067\u306f\u30a2\u30ed\u30fc\u95a2\u6570\u304c\u63a8\u5968\u3055\u308c\u307e\u3059\u3002<\/li>\n<li>\u30e1\u30bd\u30c3\u30c9\u5b9a\u7fa9\u3084\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306b\u306f\u4e0d\u5411\u304d\u3067\u3059\u3002<strong>this<\/strong> \u304c\u671f\u5f85\u901a\u308a\u306b\u30d0\u30a4\u30f3\u30c9\u3055\u308c\u306a\u3044\u305f\u3081\u3067\u3059\u3002<\/li>\n<li>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30ea\u30c6\u30e9\u30eb\u3092\u8fd4\u3059\u5834\u5408\u306f\u4e38\u62ec\u5f27\u3067\u56f2\u3080\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\n<pre><code>const getObj = () => ({ id: 1, name: 'Alice' });<\/code><\/pre>\n<\/li>\n<\/ul>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>\u30a2\u30ed\u30fc\u95a2\u6570\u306f\u30b3\u30fc\u30c9\u3092\u7c21\u6f54\u306b\u3057\u3001<strong>this<\/strong> \u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0\u306e\u7f60\u3092\u56de\u907f\u3067\u304d\u308b\u5f37\u529b\u306a\u30c4\u30fc\u30eb\u3067\u3059\u3002\u305f\u3060\u3057\u3001\u3059\u3079\u3066\u306e\u5834\u9762\u3067\u4e07\u80fd\u3068\u3044\u3046\u308f\u3051\u3067\u306f\u306a\u304f\u3001\u7528\u9014\u306b\u5fdc\u3058\u3066\u5f93\u6765\u306e\u95a2\u6570\u5ba3\u8a00\u3068\u4f7f\u3044\u5206\u3051\u308b\u3053\u3068\u304c\u91cd\u8981\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30a2\u30ed\u30fc\u95a2\u6570\u3068\u306f \u30a2\u30ed\u30fc\u95a2\u6570\u306f ECMAScript 6 (ES6) \u3067\u5c0e\u5165\u3055\u308c\u305f\u3001\u95a2\u6570\u3092\u7c21\u6f54\u306b\u8a18\u8ff0\u3067\u304d\u308b\u69cb\u6587\u3067\u3059\u3002\u5f93\u6765\u306e function \u5ba3\u8a00\u306b\u6bd4\u3079\u3066\u30b7\u30f3\u30bf\u30c3\u30af\u30b9\u304c\u77ed\u304f\u3001this \u304c\u30ec\u30ad\u30b7\u30ab\u30eb\u306b\u30d0\u30a4\u30f3\u30c9\u3055\u308c\u308b\u70b9\u304c\u7279\u5fb4\u3067 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-507","post","type-post","status-publish","format-standard","hentry","category-web"],"_links":{"self":[{"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/posts\/507","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/comments?post=507"}],"version-history":[{"count":0,"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/posts\/507\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/media?parent=507"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/categories?post=507"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/tags?post=507"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}