showing results for - "javascript exit out of if statement"
Finn
12 Jun 2020
1function example(bool){
2	label: if(bool){
3		console.log("a");
4      	break label;
5      	console.log("never gets here");
6    }
7  	console.log("b");
8}
9example(true); //logs a then b doesnt return out of function