Ad
  • Custom User Avatar

    Hey looks like there was an issue created by ES6 transpilation for one of the test cases, you can see the comment below for the resolution.

    I think you were real close to finishing it, try submitting again :). Good luck!

  • Custom User Avatar

    I'm all the way down to test 28. Where the function declared is var id = function (id) { return id; }
    But when I print the given function I actually get function id(_id) { return _id; }
    The argument passed into the defaultArguments is { id: 'test' }
    My first question is: Is there a special meaning to parameters prefixed with _?

    Second, when I work around this test by ignoring any _ prefix. The second test which calls the exact same function, and passes the exact same argument into defaultArguments expects the method not to return a default.
    Is this a broken test or am I missing something?

    My test output with some logging:
    var id = function (id) { return id; }

    function id(_id) {
    return _id;
    }
    Args: { id: 'test' }
    Test Passed: Value == test

    function id(_id) {
    return _id;
    }
    Args: { id: 'test' }
    defaultArguments(id,{id:"test"})(undefined) - Expected: undefined, instead got: test