Dear All,
Good nights,
I ´m doing the chapter Practice comparing different values,
but sadly i am having problems with the challenge,
could anyone please help me ?
Thanks in advance,
Kind regards,
Ivonne
Your code so far
// Setup
function compareEquality ( a, b){
if (a === b) { // Change this line
return " Not Equal ";
}
return " Equal ";
}
// Change this value to test
compareEquality( 10 , " 10 ");
function compareEquality(a, b){
if (a === b ){
return " Not Equal";
}
return "Equal";
}
compareEquality ( "20", 20 );
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36.
Dear @J1marotta,
Thanks for the quick reply, i am doing this challenge but it seems that i am
doing something wrong with my code, because always gives me as a result
compareEquality(10, “10”) should return “Not Equal”
compareEquality(“20”, 20) should return “Not Equal”
I know that i should use the strict equality operator and i used it , but i don´t know why i still have the same mistakes.
Dear @J1marotta,
I made it, it was a small small change what i never have imagined i could do,
and the challenge was a success, i think i was writting too much things and finally
it was a simple change that should have done , i thank you for your advise,
and i am happy happy now
have a wonderful night,
Kind regards,
Ivonne