how to execute same piece of code for both if and else

If your common statement same location xxx doesn’t need to be in if-else then put it out of the if-else.
I guess you want this.

if{
     condition fails move it
}
else{
     execute different condition and move it
}
same location xxx

Browse More Popular Posts

Leave a Comment