create a vehicle driving javascript model code example
Example: js self driving car
function selfDrivingCar (car){
while(car.isDriving){
console.log("vroom vroom");
if(car.isGoingToCrash){
car.dont();
console.log("crash avoided");
}
}
}