Ternary Operator,10/11,question number three


#1

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/courses/learn-javascript-control-flow/lessons/control-flow/exercises/ternary-operator?action=lesson_resume&course_redirect=introduction-to-javascript

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!");


#2

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!');

#3

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