Created
January 6, 2020 02:11
-
-
Save 01Clarian/d9ac9e62a0e80bfa1f2e2bb1a1e87bf2 to your computer and use it in GitHub Desktop.
index.js
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
function inclusiveArrayParam(startVal, endVal) { | |
const arr = [] | |
for(let i = startVal; i <= endVal; i++) { | |
arr.push(i) | |
} | |
return arr | |
} | |
console.log('iterative inclusive array solution: ', inclusiveArrayParam(2, 6)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment