Created
September 28, 2023 20:06
-
-
Save bwll/a417b03d71f373785cc2b0919a5dbbec to your computer and use it in GitHub Desktop.
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
const range = (start, end, step = 1) => { | |
let output = []; | |
if (typeof end === 'undefined') { | |
end = start; | |
start = 0; | |
} | |
for (let i = start; i < end; i += step) { | |
output.push(i); | |
} | |
return output; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment