Timeline for Determine if Array has an Increasing Sequence
Current License: CC BY-SA 4.0
7 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jul 5, 2018 at 23:29 | comment | added | rolfl |
@CertainPerformance - good point. As it happens, I used some(...) earlier today in my real job, and it came to mind first. I should have taken that extra step to make it more readable - even reviewed code can be reviewed.
|
|
| Jul 5, 2018 at 22:49 | comment | added | CertainPerformance |
Rather than !arr.some followed by a negative test, you might make the logic clearer if you used every and a positive test: const increasingSequence = (arr) => arr.every((val, idx) => val === arr[0] + idx);
|
|
| S Jul 5, 2018 at 16:21 | history | suggested | MadHatter | CC BY-SA 4.0 |
Clarification!
|
| Jul 5, 2018 at 16:03 | review | Suggested edits | |||
| S Jul 5, 2018 at 16:21 | |||||
| Jul 5, 2018 at 15:45 | vote | accept | MadHatter | ||
| Jul 5, 2018 at 15:44 | history | edited | rolfl | CC BY-SA 4.0 |
added 68 characters in body
|
| Jul 5, 2018 at 15:32 | history | answered | rolfl | CC BY-SA 4.0 |