Ad

change the distance to see if youre almost there

Code
Diff
  • let distance = 1
    if (distance < 3) {
      console.log ("ALMOST THERE!")
    }
    if (distance > 3) {
      let brake=0 
      let gas=5
      console.log ("yuh gotta wait a little")
    }
    • let distance = 6
    • let distance = 1
    • if (distance < 3) {
    • console.log ("ALMOST THERE!")
    • }
    • if (distance > 3) {
    • let brake=0
    • let gas=5
    • console.log ("yuh gotta wait a little")
    • }
let distance = 6
if (distance < 3) {
  console.log ("ALMOST THERE!")
}
if (distance > 3) {
  let brake=0 
  let gas=5
  console.log ("yuh gotta wait a little")
}