Skip to content

Instantly share code, notes, and snippets.

@macikokoro
Last active August 29, 2015 14:03
Show Gist options
  • Save macikokoro/ab6ec63468b98e25740b to your computer and use it in GitHub Desktop.
Save macikokoro/ab6ec63468b98e25740b to your computer and use it in GitHub Desktop.
While loop example.
var totalCars = 10;
var carsOperational = 8;
var carNumber = 1;
while(carNumber <= carsOperational) {
console.log("Car #" + carNumber + " is running.");
carNumber++;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment