{"author_url":"https://blog.hatena.ne.jp/edgegram/","height":"190","provider_name":"Hatena Blog","provider_url":"https://hatena.blog","title":"Underscore.js\u304a\u3055\u3089\u30443(Arrays)","categories":["JavaScript","Underscore.js"],"url":"https://edgegram.hatenablog.jp/entry/2016/03/02/191213","width":"100%","author_name":"edgegram","published":"2016-03-02 19:12:13","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fedgegram.hatenablog.jp%2Fentry%2F2016%2F03%2F02%2F191213\" title=\"Underscore.js\u304a\u3055\u3089\u30443(Arrays) - edgegram\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","blog_url":"https://edgegram.hatenablog.jp/","blog_title":"edgegram","version":"1.0","description":"first _.first(array, [n]) \u5148\u982d\u306e\u8981\u7d20\u3092\u8fd4\u3059\u3002shift\u3068\u9055\u3044\u975e\u7834\u58ca\u7684\u3002 n\u3092\u6307\u5b9a\u3059\u308b\u3068\u5148\u982d\u304b\u3089n\u500b\u5206\u306e\u8981\u7d20\u3092\u914d\u5217\u3067\u8fd4\u3059\u3002 initial _.initial(array, [n]) \u6700\u5f8c\u306e\u8981\u7d20\u3092\u9664\u3044\u305f\u914d\u5217\u3092\u8fd4\u3059\u3002 n\u3092\u6307\u5b9a\u3059\u308b\u3068\u5f8c\u308d\u304b\u3089n\u500b\u5206\u9664\u3044\u305f\u6b8b\u308a\u3092\u8fd4\u3059\u3002 _.initial([5, 4, 3, 2, 1]); => [5, 4, 3, 2] last _.last(array, [n]) first\u306e\u9006\u3002\u6700\u5f8c\u306e\u8981\u7d20\u3092\u8fd4\u3059\u3002 rest _.rest(array, [index]) initial\u306e\u9006\u3002\u6700\u521d\u306e\u8981\u7d20\u3092\u9664\u3044\u305f\u914d\u5217\u3092\u8fd4\u3059\u3002 \u591a\u5206first\uff5erest\u306f\u3001\u975e\u7834\u2026","type":"rich","image_url":null}