{"title":"Ruby\u306beach_with_self\u3068\u3044\u3075\u30e1\u30bd\u30c3\u30c9\u306f\u7121\u3044\u3002JavaScript\u306b\u306f\u6709\u308b\u306e\u306b","blog_url":"https://c4se.hatenablog.com/","published":"2015-03-01 18:07:05","categories":["Programming","JavaScript","Ruby"],"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fc4se.hatenablog.com%2Fentry%2F2015%2F03%2F01%2F180705\" title=\"Ruby\u306beach_with_self\u3068\u3044\u3075\u30e1\u30bd\u30c3\u30c9\u306f\u7121\u3044\u3002JavaScript\u306b\u306f\u6709\u308b\u306e\u306b - c4se\u8a18\uff1a\u3055\u3063\u3061\u3083\u3093\u3067\u3059\u3088\u2606\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_url":"https://blog.hatena.ne.jp/Kureduki_Maari/","blog_title":"c4se\u8a18\uff1a\u3055\u3063\u3061\u3083\u3093\u3067\u3059\u3088\u2606","description":"JavaScript\u3067\u306fforEach()\u306a\u3069\u306e\u30eb\u30fc\u30d7\u306bthis\u304c\u6e21\u3055\u308c\u308b\u3002\u8981\u7d20\u306e\u756a\u53f7\u3082\u4e00\u7dd2\u306b\u308f\u305f\u3063\u3066\u304f\u308b\u3002 var a = [6, 5, 4]; a.map(function (elm) { return elm * 2; }). forEach(function (elm, i, a) { console.log([elm, i, a]); }); // [ 12, 0, [ 12, 10, 8 ] ] // [ 10, 1, [ 12, 10, 8 ] ] // [ 8, 2, [ 12, 10, 8 ] ] Ruby\u306eeach\u306f\u305d\u3093\u306a\u5f15\u6570\u306f\u304f\u308c\u306a\u3044\u3002\u305d\u3053\u3067each_with_index\u2026","type":"rich","version":"1.0","width":"100%","provider_name":"Hatena Blog","author_name":"Kureduki_Maari","image_url":null,"provider_url":"https://hatena.blog","height":"190","url":"https://c4se.hatenablog.com/entry/2015/03/01/180705"}