This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// While Loop | |
var canGraduate = false; | |
// The while loop will execute the logic within as long as the logical condition is true | |
// In this example we're evaluating the negated (!) value of canGraduate | |
// Negating means that your flipping a false to true and vice-versa. | |
while (!canGraduate) { | |
passNextCourse(); | |
//In this scenario, when you've met all the requirements for graduation | |
//This expression will set the value of canGraduate to true | |
canGraduate = haveIMetTheRequirementsForGraduation(); |