
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Sure there is a lot of ways. There is little chance "2" will change but still I don't like it because is not clear what that means...well of course we know it...anyway you see what I mean. Matter of taste.
For sure on my "real" code I don't use 2 times a function in a row...but on a forum it's good enough ;-)
I usually use a "switch":
This way I can also add code specific to the type if need be, within the "switch" statement.