Ternary Operator,10/11,question number three


<Below this line, add a link to the EXACT exercise that you are stuck at.>

need help, pls see if there is any problem with the code

Replace this line with your code. 
let isLocked = false;

isLocked ? 
  console.log('You will need a key to open the door.'):
  console.log('You will not need a key to open the door.');

let isCorrect = true;

isCorrect ? console.log('Correct!'):  console.log('Incorrect!');

let favoritePhrase = 'Love That!'

favoritePhrase ? 
  console.log('I love that!') : 
console.log("I don't love that!");


for favoritePhrase, you can’t just remove the comparison, see the example provided by lesson:

age >= 16 ? console.log('You are old enough to drive in the United States!') : console.log('You are not old enough to drive in the United States!');


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.