Ad
  • Default User Avatar

    I also can not commit my answer , but I hava a test in Chrome-Console,it pass,here is my code (javascript):

    var circleArea = function(radius) {
    if(typeof radius != 'number' || radius <=0) return false;
    return (Math.PIradiusradius).toFixed(2);
    };

  • Custom User Avatar

    Have you tried hitting the Submit button rather than Run Tests? My test case was just the function and gave me "Unknown Error." This is due to not using Test.assert_equals(circleArea(1), 3.14) function inside the test case window. But hitting submit uses the test cases of the author instead of your own, thus passing the test if your code works. Which it looks like it does.