MCPcopy Create free account
hub / github.com/codecombat/codecombat / __range__

Function __range__

app/core/utils.js:2098–2106  ·  view source on GitHub ↗
(left, right, inclusive)

Source from the content-addressed store, hash-verified

2096 return (typeof value !== 'undefined' && value !== null) ? transform(value) : undefined
2097}
2098function __range__ (left, right, inclusive) {
2099 const range = []
2100 const ascending = left < right
2101 const end = !inclusive ? right : ascending ? right + 1 : right - 1
2102 for (let i = left; ascending ? i < end : i > end; ascending ? i++ : i--) {
2103 range.push(i)
2104 }
2105 return range
2106}

Callers 1

hashStringFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected