Review of functions in JavaScript: 11.Helper functions

error: Your code didn’t printout
Here is the link

function doubleMax(x, y) {
// add the correct function call after the ‘+’ operator
return 2 * getMaxnum(x, y);

// call me for help!
function getMaxnum(n1, n2) {
if (n1 < n2) {
return n2;
else {
return n1;

this exercise is no longer supported, but it is not impossible to pass.

looking at the checking script, the result printed should be 41. which means we need to call the function with 20.5:


why 41 needs to be the output? I will honestly admit i don’t know, guess the creator of the course decide as such