create a javascript function and show it working that sequence( start, step ) This function takes two numeric inputs, start and step, and returns a function of no inputs. The ith invocation of the...



create a javascript function and show it working that


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 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here