Link to home
Start Free TrialLog in
Avatar of KaranGupta
KaranGupta

asked on

if else or switch

Hi

This is a very common question that is similar to every programming.

My query is which language construct to use when and which is quicker.
ASKER CERTIFIED SOLUTION
Avatar of Pratima
Pratima
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
when tou have one or two conditions go for if elese.
if you have ladderof if else if then go for switch
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hello, If you want the application is quickly execute then my advice is you should use the switch() case .
Avatar of KaranGupta
KaranGupta

ASKER

Thanks