This code is not giving output, Please let me where i'm making mistake?

This code is not giving output, Please let me where i'm making mistake?
0

#1

Tell us what’s happening:

Your code so far


function checkEqual(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) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36.

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


#2

@finnabc123 the true and false are not string so they need to be written without “” …
make changes as follows: return (a == b) ? true : false;


#3

Thanks Brother for instant helping.


#4

@finnabc123 Happy coding!!! :+1:t2: