JSchallenger

Find next higher natural number that is divisble by y

Viewed: 318
Attempted: 222
Solved: 35
// Write a function that takes two numbers, say x and y, as arguments
// Check if x is divisible by y
// If yes, return x
// If not, return the next higher natural number that is divisible by y

function myFunction() {

return
}
Test Cases:
myFunction(1, 23)
Expected
23
myFunction(23, 23)
Expected
23
myFunction(7, 3)
Expected
9
myFunction(-5, 7)
Expected
0