Ad

Removed 'output' variable which contained the ternary operator and placed the conditional directly in the console.log.

Code
Diff
  • let distance = 90; // try changing this value to test different outputs
    console.log(distance < 3 ? 'Almost there' : "yuh gotta wait a little");
    • let distance = 90; // try changing this value to test different outputs
    • output = distance < 3 ? "Almost there": "yuh gotta wait a little"
    • console.log(output);
    • console.log(distance < 3 ? 'Almost there' : "yuh gotta wait a little");