for of loop isn't "looping".
function containsOnlyBooleans(array){ for(i of array) { if (typeof i === "boolean" && typeof i !== "string" && typeof i !== "number"){ return true; } } return false; } actual = containsOnlyBooleans([true, false, true, false, 5]); expected = true; if (actual === expected) { console.log("Test PASSED."); } else { console.error("Test FAILED. Keep trying!"); console.group("Result:"); console.log(" actual:", actual); console.log("expected:", expected); console.groupEnd(); } actual = containsOnlyBooleans([true, true, true, "not a boolean"]); expected = false; if (actual === expected) { console.log("Test PASSED."); } else { console.error("Test FAILED. Keep trying!"); console.group("Result:"); console.log(" actual:", actual); console.log("expected:", expected); console.groupEnd(); }