{"author_name":"shuzou555","blog_url":"https://gakkie.hatenadiary.com/","categories":[],"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgakkie.hatenadiary.com%2Fentry%2F2020%2F07%2F16%2F230517\" title=\"Find the first non-consecutive number - gakkie \u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0 \u5099\u5fd8\u9332\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","url":"https://gakkie.hatenadiary.com/entry/2020/07/16/230517","width":"100%","height":"190","image_url":null,"description":"\u554f\u984c \u9023\u7d9a\u3057\u3066\u3044\u306a\u3044\u914d\u5217\u306e\u6700\u521d\u306e\u8981\u7d20\u3092\u898b\u3064\u3051\u308b\u3053\u3068 \u9023\u7d9a\u3057\u3066\u3044\u306a\u3044\u3068\u3044\u3046\u3053\u3068\u306f\uff0c\u914d\u5217\u306e\u524d\u306e\u8981\u7d20\u3088\u308a\u3082\u6b63\u78ba\u306b1\u3064\u5927\u304d\u304f\u306a\u3044\u3053\u3068 function firstNonConsecutive (arr) { //\u521d\u671f\u5316i=0\u3001\u8981\u7d20\u6570-1\u304ci\u3088\u308a\u5927\u304d\u3044\u5834\u5408\u304c\u771f\u306e\u5834\u5408\u4ee5\u4e0b\u3092\u304f\u308a\u8fd4\u3059\u3002\u6700\u5f8c\u306bi\u306b1\u3092\u8db3\u3059\u3002 for(let i = 0; i < arr.length - 1; ++i){ //index\u756a\u53f7 = \u5024\u3067\u306f\u306a\u3044\u5834\u5408\u3001\u5024\u3092\u8fd4\u3059\u3002 if (arr[i] + 1 !== arr[i + 1]) { return arr[i + 1] //arr[i + 1] } } return null } \u3044\u3064\u3082\u3042\u2026","published":"2020-07-16 23:05:17","provider_name":"Hatena Blog","title":"Find the first non-consecutive number","blog_title":"gakkie \u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0 \u5099\u5fd8\u9332","author_url":"https://blog.hatena.ne.jp/shuzou555/","provider_url":"https://hatena.blog","version":"1.0","type":"rich"}