I am new to javascript.
I have to create a function that returns the next multiples of 5 based on a given number.But my loop repeats the information, it doesn´t increment the result.What am I doing wrong?
function proS (num, mult){
let arr = []
for (var i = 1; i <= mult; i ++){
arr.push(Math.ceil(num / 5) * 5)
}
return arr
}
proS(6,4)
returns [10,10,10,10]