Hi there, I’ve been solving this nice algorithm https://www.hackerrank.com/challenges/compare-the-triplets
Can anyone please explain me what I should correct so that it works?
<Below this line, add a link to the EXACT exercise that you are stuck at.>
The initial and the last parts of the code can be found here https://www.hackerrank.com/challenges/compare-the-triplets
<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>
Also, it gives me a SyntaxError: Unexpected token { after line 10.
Really appreciate your help!
function solve(a0, a1, a2, b0, b1, b2){
// Complete this function
var a = 0
var b = 0
var a0 = 0
var b0 = 0
var a1 = 0
var b1 = 0
var a2 = 0
var b2 = 0
if(a0 > b0) {
a++;
} else(b0 > a0) { b++;
}
else if(a0 === b0) { a == 0, b == 0;
}
if(a1 > b1) {
a++;
} else(b1 > a1) { b++;
}
else if(a0 === b0) { a == 0, b == 0;
}
if(a2 > b2) {
a++;
} else(b2 > a2) { b++;
}
else if(a0 === b0) { a == 0, b == 0;
}
}
return(a,b);