DEV Community

Discussion on: How do you handle the disposable IF statements ?

Collapse
 
dbanty profile image
Dylan Anthony

It will be executed again won’t it? For every new user? I tend to think of my code on a broader scope, how it runs for all users across all time. It helps me sleep at night 🙂

Collapse
 
mazentouati profile image
Mazen Touati • Edited

Indeed, however it still not executing for the same user, I don't know but I feel there's something wrong here 😂. Some IFs may be scoped to the entire application or to check for a specific configuration. You may find them in distributed scripts for example :

if ( ! isAppProperlyInstalled() ) {
  die('Please, check the installation guide...');
}