Jump to content

Den356

Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by Den356

  1. Hello everyone,

    please help the newbie figure it out.

    There is such a JS code.

    function makeDouble (x) {
    
    return x * 2; }
    
    var doMath = (x, func) => func(x + 5);
    var num = 5;

    The task is this:
    Using only makeDouble, doMath, and num, make the value of num equal to 20.

    num = _____________________________________________________

    I can’t understand why there are two parameters in the arrow function, but in the body of this function itself there is only one parameter. What am I doing wrong?

×
×
  • Create New...