Ad
  • Custom User Avatar

    marked as resolved

  • Custom User Avatar

    You're meant to return the boolean value of true and false, as opposed to the string representation of the boolean values that you're currently returning at the moment.

  • Default User Avatar

    I tried this code and it gives some strange errors please check why it is not passing

    function betterThanAverage(classPoints, yourPoints) {
    var TotalArray = 0;
    for (var i in classPoints) {TotalArray += classPoints[i]};
    var classavg = (TotalArray)/(classPoints.length);
    //return classavg;

    var classavgwithme = (TotalArray + yourPoints)/(classPoints.length+1);
    //return classavgwithme;

    if ((classavg < yourPoints) && (classavgwithme < yourPoints))
    {return "true"} else { return "false"};

    }