Home
Javascript Fundamentals
# Javascript basics
# Javascript arrays
# Javascript objects
# Javascript dates
# Javascript Sets
Javascript DOM
# DOM selector methods
# Events and user interactions
# DOM manipulation
# DOM fundamentals
# Recursive functions
Challenge Rush
Random Challenge
// 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 ( x, y ) { return }
return
myFunction(1, 23)
23
myFunction(23, 23)
myFunction(7, 3)
9
myFunction(-5, 7)
0