+ 2
How can i use break statement in if else without using any loop
4 Respuestas
+ 2
Break is only in loops. You can make your condition stricter in if/else to avoid them all working. Show your code and I'll try and give an example
+ 2
Because your else isn't attached to anything. The if without braces only encompasses the single statement that immediately follows it.
0
It will only execute only one or none of those blocks.,but why don't you try it? and see nothing happened. it is completely waste
- 1
Did you mean how to use `break` in a `switch` statement?