You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

whileloop.js 442B

123456789101112131415161718192021222324
  1. let fuelLevel = 4000;
  2. let fuelMin = 5000;
  3. let fuelMax = 30000;
  4. let astronautsOnBoard = 10;
  5. let altitude = 50;
  6. while (fuelMin <= fuelLevel) {
  7. if (fuelLevel < 5000) {
  8. console.log("te weinig brandstof")
  9. } else
  10. console.log(fuelMin)
  11. fuelMin++;
  12. }
  13. let minAstronaut = 1;
  14. let maxAstronaut = 8;
  15. while (minAstronaut <= astronautsOnBoard) {
  16. console.log(minAstronaut);
  17. minAstronaut++;
  18. if (minAstronaut === 8) {
  19. break;
  20. }
  21. }
  22. //let fuelStatus =