• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

break

The break statement is used when the loop must be ended before the condition for the loop is false. In this case, the insertion of a break statement will cause the loop to end, and any code after the break that is within the loop will not be executed. For example:

<cfscript> 
    while(condition){ 
        if(condition) 
       break; 
        else{ 
         statement; 
        } 
    } 
</cfscript>
				


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint