{"type":"rich","provider_url":"https://hatena.blog","description":"\u914d\u5217\u306e\u8981\u7d20\u306e\u9806\u756a\u3092\u5165\u308c\u66ff\u3048\u308b\u3068\u304d\u3001 let temp = ary[x]; ary[x] = ary[y]; ary[y] = temp; \u307f\u305f\u3044\u306b\u3084\u3063\u3066\u305f\u3051\u3069\u3001 \u306a\u3093\u304b1\u884c\u3067\u3067\u304d\u308b\u3089\u3057\u3044\u3002 function swap(a,x,y){ a[x]=[a[y],a[y]=a[x]][0]; return a; } \u6700\u521d\u898b\u305f\u3068\u304d\u610f\u5473\u308f\u304b\u3093\u306a\u304b\u3063\u305f\u3093\u3060\u3051\u3069\u3001\u30b3\u30e1\u30f3\u30c8\u8ffd\u52a0\u3057\u3066\u66f8\u304d\u4e0b\u3059\u3068\u3053\u3046\u3002 function swap(array,index1,index2){ // array[y]\u306e\u5024\u3092\u6dfb\u3048\u5b570\u306b\u3001 // array[y]=array[index1]\u306e\u300c\u4ee3\u5165\u306e\u5b9f\u884c\u7d50\u679c\u300d\u3092\u6dfb\u5b571\u306b\u6301\u3063\u305f\u914d\u5217\u3092\u4f5c\u6210 le\u2026","image_url":null,"published":"2017-09-24 02:58:54","author_url":"https://blog.hatena.ne.jp/beatdjam/","blog_title":"B-Teck!","title":"\u3010JavaScript\u3011\u914d\u5217\u306e\u8981\u7d20\u306e\u5165\u308c\u66ff\u3048","author_name":"beatdjam","provider_name":"Hatena Blog","width":"100%","url":"https://blog.beatdjam.com/entry/2017/09/24/025854","blog_url":"https://blog.beatdjam.com/","categories":["JavaScript"],"height":"190","version":"1.0","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.beatdjam.com%2Fentry%2F2017%2F09%2F24%2F025854\" title=\"\u3010JavaScript\u3011\u914d\u5217\u306e\u8981\u7d20\u306e\u5165\u308c\u66ff\u3048 - B-Teck!\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>"}