Embed a Conditional in a Conditional?

Since the and operator exists, is there any reason to embed a conditional in another conditional?

Can you give an example of what you mean?

if (a ===0){
     if (b === 1){
         if (c===2){
             if (d ===3){ 

Should an if-statement never be inside any if-statement?

It depends upon what logic you need to express. I nest logic all the time

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.