{"id":603,"date":"2021-09-17T15:22:17","date_gmt":"1970-01-01T00:00:00","guid":{"rendered":"http:\/\/swift.tecc0.com\/?p=603"},"modified":"2021-09-17T15:22:17","modified_gmt":"1970-01-01T00:00:00","slug":"post-603","status":"publish","type":"post","link":"https:\/\/swift.tecc0.com\/?p=603","title":{"rendered":"Swift\u3067\u5909\u6570\u306b\u95a2\u6570\u3092\u4ee3\u5165\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p>Swift\u3067\u306f<strong>\u5909\u6570\u306b\u95a2\u6570\u3092\u4ee3\u5165<\/strong>\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3002<\/p>\n<p>&nbsp;<\/p>\n<h3>Swift\u3067\u5909\u6570\u306b\u95a2\u6570\u3092\u4ee3\u5165\u3059\u308b<\/h3>\n<pre class=\"lang:swift decode:true\">func sum(numbers:Int...) -&gt; Int {\r\n    var sum = 0\r\n    for num in numbers {\r\n        sum += num\r\n    }\r\n    return sum\r\n}\r\n\r\nlet calcTotal = sum(numbers:)\r\nprint(calcTotal(1,2,3)) \/\/ 6<\/pre>\n<p>&nbsp;<\/p>\n<p>\u3053\u3093\u306a\u611f\u3058\u3067\u3001<strong>\u5909\u6570\u306b\u95a2\u6570\u3092\u4ee3\u5165<\/strong>\u3059\u308b\u3053\u3068\u3067\u3001\u95a2\u6570\u3068\u540c\u3058\u304f\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u306b\u306a\u308b\u3088\u3002<\/p>\n<p>\u307e\u305f\u3001\u5f15\u6570\u304c2\u3064\u306e\u3068\u304d\u306a\u3093\u304b\u306f <span style=\"color: #ff0000;\">let method\u00a0= hoge(fuga: moe:)<\/span> \u307f\u305f\u3044\u306b\u66f8\u304f\u3088\u3002<\/p>\n<p>Javascript\u306a\u3093\u304b\u306b\u6163\u308c\u3066\u308b\u4eba\u306b\u306f\u91cd\u5b9d\u3059\u308b\u304b\u3082\u306d\u3001\u305f\u3076\u3093\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Swift\u3067\u306f\u5909\u6570\u306b\u95a2\u6570\u3092\u4ee3\u5165\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3002 &nbsp; Swift\u3067\u5909\u6570\u306b\u95a2\u6570\u3092\u4ee3\u5165\u3059\u308b func sum(numbers:Int&#8230;) -&gt; Int { var sum = 0 for num in &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[17],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=\/wp\/v2\/posts\/603"}],"collection":[{"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=603"}],"version-history":[{"count":1,"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=\/wp\/v2\/posts\/603\/revisions"}],"predecessor-version":[{"id":604,"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=\/wp\/v2\/posts\/603\/revisions\/604"}],"wp:attachment":[{"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=603"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=603"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=603"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}