DEV Community

Discussion on: Managing Your Personal Finances as a Dev - While Loop Style

Collapse
 
gene profile image
Gene • Edited

This

while (financiallyStable && age < retirementAge) {
    moneyGoingIntoAccounts++;
    moneySaved++;
    enjoyLifeExperiencesWithOutStress++;

    if (interestedInRetiringEarly) {
        retirementAge--
    }
    age++;
}

...however means that if finaciallyStable and age < retirementAge no longer satisfies, you'll stop having money going to accounts, saved money, and you enjoying your lifeexperiences without stress will remain whatever it is.

Collapse
 
avatarkaleb profile image
Kaleb M

That is true 😁 I'll update it when I return home. Thank you !

Collapse
 
gene profile image
Gene

Overall, what you said here is true! Thank you for sharing :)

Thread Thread
 
avatarkaleb profile image
Kaleb M

Thank you for reading! The code examples were meant to developerify it :) hope you enjoyed!