Use the Conditional (Ternary) Operator kindly assist

Use the Conditional (Ternary) Operator kindly assist
0

#1

Tell us what’s happening:
Kindy assist all is working but (1,1)

Your code so far


function checkEqual(a, b) {
 var a, b= "";
return a = b ?   true : false;
}

checkEqual(1, 2);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/use-the-conditional-ternary-operator


#2

Always remember that = is the assignment operator. It does not check for equality.


#3

I tried to change it but i still get the same error.


#4

What is your current code? What does the failing test say?


#5


#6

Try deleting this line of code:


#7

I get this once i do that


#8

Ah, yes. You’re almost there. Now you just need to change a=b to be a===b :smile:


#9

Thank you.Solved it.


#10

Great! You can close this topic by marking as “answer” the suggestion that helped you solve it.