in javascript please create a function that does the following and is named as such please don't copy and paste the incorrect answer sequence( start, step ) This function takes two numeric inputs,...


in javascript please create a function that does the following and is named as such


please don't copy and paste the incorrect answer


sequence( start, step )

This function takes two numeric inputs, start and step, and returns a function of no inputs. The ith invocation of the resulting function will generate the value: start + step * i. The first invocation is said to be the 0th.


Examples




  • var x = sequence( 3, 15 )

  • [ x(), x(), x() ] => [ 3, 18, 33 ]

  • var y = sequence( 28, -5 )

  • [ y(), y(), y() ] => [ 28, 23, 18 ]




Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here