False Positive Code Evaluation - Bug Report

Code evaluated:

// Our Person constructor
function Person(name, age) {
    this.name = name;
    this.age = age;
}

// Now we can make an array of people
var family = new Array();
family[0] = new Person("alice", 40);
family[1] = new Person("bob", 42);
family[2] = new Person("michelle", 8);
family[3] = new Person("timmy", 6);
// loop through our new array
for (var i=0; i<5; i++) {
    var i = family; // this will cause the loop to exit as i = family > 5
    console.log(i); //this will print the entire array object
};

Expected Result: Test Fail
Actual Result: Test Passed

@f3z0,
Your future i probably being a code-tester :bell:

1 Like

Thank you for your feedback on this issue. We will move this post to the Platform category for futher review. The fact of the matter is that since the user is not blocked in any way by this issue, it is a low priority and may never be fixed. It is still good to know that the code is passing, when perhaps it wouldn’t with more stringent submission testing.

We do hear from membrs saying that they would prefer a lesson not let them pass if they have an error. Something we learn to live with in a user-contributed content environment.

1 Like