Skip to content

Latest commit

 

History

History

02-count-by-x

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Count by X

Write a program that accepts two arguments (x and n) and returns an array of the first (n) multiples of (x).

Criteria

  • Assume both arguments will be positive numbers greater than 0.
  • Return the results as an array.

Examples

  countBy(1,10) === [1,2,3,4,5,6,7,8,9,10]
  countBy(2,5) === [2,4,6,8,10]