Browse Source

Day 5 js

master
boB Rudis 3 years ago
parent
commit
6c26bbcae7
No known key found for this signature in database GPG Key ID: 1D7529BE14E2BBA9
  1. 8
      js/05.js

8
js/05.js

@ -48,12 +48,6 @@ console.log(Math.max(...res))
// 05-02
diff = res.map((n, i, a) => i ? n - a[i-1] : 0 - n)
diff = res.map((val, idx, arr) => idx ? val - arr[idx-1] : 0 - val)
console.log(res[diff.findIndex((x) => x > 1)] - 1)

Loading…
Cancel
Save