<cfdefaultcase>

Defines what happens within a cfswitch statement, when none of the cfcase statements are true. Use this tag only within a cfswitch and each cfswitch may only have one cfdefaultcase.

This tag must have a body.

This tag is also supported within <cfscript>

This tag does not use any attributes.

<cfdefaultcase><!--- body ---></cfdefaultcase>

Examples

```lucee+trycf this is from case 2 this is from case 2 this is from default part

<cfscript>
//Script example
    switch(1){
       case 1:
         result = 1;
         break;
       case 0:
         result = 0;
         break;
       default:
         result = "defaultCase";
    }
    writeDump(result);
</cfscript>

```

See also