Looks like trouble with the logic of it to me. Why don't you try instead "if ... -> return true", take the else away and change the "return true" at the end for "return false" and then take it from there?
Spacing is funny that way here. Let me try it. Try this one:
function ix129(arrx){
for (let i=0;i<arrx.length; i++){
let a = arrx[i];
for (let j=i+1; j<arrx.length;j++){
let b = arrx[j];
if(a==b) {document.write("False"); return;}
}
}
document.write("True");
}
3
u/NoAd7524 Jul 02 '21
Looks like trouble with the logic of it to me. Why don't you try instead "if ... -> return true", take the else away and change the "return true" at the end for "return false" and then take it from there?