This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Sequence generator function (commonly referred to as "range", e.g. Clojure, PHP etc) | |
const range = (start, stop, step = 1) => Array.from({ length: (stop - start) / step + 1}, (_, i) => start + (i * step)); | |
// Generate numbers range 0..4 | |
range(0, 4); | |
// [0, 1, 2, 3, 4] | |
// Generate numbers range 1..10 with step of 2 | |
range(1, 10, 2); | |
// [1, 3, 5, 7, 9] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Since 2013 I've worked entirely in the open, lowering the barriers to different | |
developer ecosystems as one of the most active users on GitHub. | |
I've helped big OSS projects with design, project management and occasionally code. |