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
//Copy this over the contents at tddbin.com | |
//Replace the [] in the assert statements with a functional equivalant | |
//Reference here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array | |
//Lambda syntax: (x,y) => x + y, works in firefox, try it out :) | |
function range(start, end, jump) { | |
jump = jump || 1 | |
if (start && !end) | |
return actualRange(0, start, jump) | |
return actualRange(start, end, jump) |