Vigilante
Posts: 1,634 +0
Hey, I usually have other forums for programming, but since I like it here, I figured I'd give my fellow members a shot at it. Let me summarize my code, see if you can tell me why I'm having the issue. Here is a mock up, simplistic java function:
Can anybody tell me why I cannot execute any code after the for loop, inside the function? Or why that might be?
Note that in the for loop, I use NO break or continue statements. In the for loop I have a while loop and one IF statement. That's it. But when the FOR loop ends, I can't do anything else in code. What's up with that?
I know the for loop and sub code works just fine, as I've monitored it and the output is perfect. But when the loop comes to an end, apparently so does all other code in the function.
Any ideas?
<script>
function test() {
var somevar;
var somevar2;
//other assignments
for ( the main for loop ) {
// all kinda stuff in for loop
}
// NOTHING HERE EXECUTES!!
}
</script>
Can anybody tell me why I cannot execute any code after the for loop, inside the function? Or why that might be?
Note that in the for loop, I use NO break or continue statements. In the for loop I have a while loop and one IF statement. That's it. But when the FOR loop ends, I can't do anything else in code. What's up with that?
I know the for loop and sub code works just fine, as I've monitored it and the output is perfect. But when the loop comes to an end, apparently so does all other code in the function.
Any ideas?