mercredi 18 novembre 2020

Multiple If / else Statements within If Statement

I am currently working on a project and I am concerned about one question while I was programming. Am I allowed to use multiple if/else statements within my If/ else statement as below?

Or is it a bad coding style and you have an alternative?

Example:

if (condition){
    if(condition){
    //Some Code
    }
    else
    //Some Code

    if(condition){
    //Some Code
    }
    else
    //Some Code
    }

Aucun commentaire:

Enregistrer un commentaire