fork download
  1. function sequence(start, step) {
  2. var count = 0;
  3. var a = start || 0;
  4. step = step || 1;
  5. return function(){
  6. if (count === 0) {
  7. count++;
  8. return a;
  9. } else {
  10. count++;
  11. return a+step;
  12. }
  13. }
  14. }// your code goes here
Success #stdin #stdout 0.01s 29552KB
stdin
Standard input is empty
stdout
Standard output is empty