JSchallenger

What is JSchallenger?

JSchallenger is a tool for learning Javascript by solving coding challenges.

How to solve a challenge?

Solving a challenge is fairly straightforward: simply write a function that passes each of the given test cases. Each test case provides a function call with input arguments and an exptected outcome. The function call should run your function with the given arguments. The return value should match the exptected value.
Try to solve the following examples:

Example 1:

// Simply return the given input

function myFunction( input ) {

return
}
Test Cases:
myFunction(123)
Expected
123
myFunction("123")
Expected
"123"

Example 2:

// Find the maximum number of an array

function myFunction( input ) {

return
}
Test Cases:
myFunction([1,2,3])
Expected
3
myFunction([10,1000,100])
Expected
1000
myFunction([-10,-2,-11])
Expected
-2
Did you pass them? Then you are good to go!