Ad
  • Default User Avatar

    Thanks again!

  • Default User Avatar

    Sure. I was testing in JavaScript. my code was:

    function _if(bool, func1, func2) {

    var result = (bool) ? func1 : func2;

    return result;

    }

    and my test was:
    Test.expect(_if(false, function(){ return true; }, function(){return false;}));

    The output was always a pass when testing, but failing upon submission. A few moments ago, I got it too work.

  • Default User Avatar

    Hi OverZealous, no I haven't been able to. It seems like there could be a mistake on my end or there is something a bit funny with the script.

    When I declare a variable within the function, and then reuse it later, it doesn't seem to be defined. I am currently reading some of the documentation to see if there was something I missed.

  • Default User Avatar

    All right, thanks. I will see how it goes. Cheers!

  • Default User Avatar

    I am trying to submit a solution to the Kata "The 'if' function" and I have a solution that passes the tests, but not on submission. My error is: Failed to send to server. Check your internet connection.

    My connection is fine. Can anybody help me out? Thanks!