Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
index.js
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