MCPcopy Create free account
hub / github.com/marijnh/Eloquent-JavaScript / 04_1_the_sum_of_a_range.js

File 04_1_the_sum_of_a_range.js

code/solutions/04_1_the_sum_of_a_range.js:None–None  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1function range(start, end, step = start < end ? 1 : -1) {
2 let array = [];
3
4 if (step > 0) {

Callers

nothing calls this directly

Calls 2

rangeFunction · 0.70
sumFunction · 0.70

Tested by

no test coverage detected