# switch syntax flexibility

**URL:** <https://forum.servoy.com/t/switch-syntax-flexibility/15360>\
**Category:** Classic Servoy\
**Created:** [January 17, 2012, 12:04pm UTC](https://forum.servoy.com/t/switch-syntax-flexibility/15360 "2012-01-17T12:04:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JvNoort](https://avatars.discourse-cdn.com/v4/letter/j/5f9b8f/32.png) [@JvNoort](https://forum.servoy.com/u/JvNoort)\
**Post date:** [January 17, 2012, 12:04pm UTC](https://forum.servoy.com/t/switch-syntax-flexibility/15360/1 "2012-01-17T12:04:49Z")

</div>

Hello

Is it possible in (future) version of Rhino, to get javascript syntax like:

```auto
	switch (sDestType) {   

	case "foo":
	         ... stuff
                break;
						
	case "this", "that":
	        ... other stuff 
	        break;						
	}

```

Say, now I don’t know how to make case “multi” working…

Reards, Jan

---

<div class="post-metadata">

**Author:** ![ROCLASI](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/roclasi/32/4371_2.png) [@ROCLASI](https://forum.servoy.com/u/ROCLASI)\
**Post date:** [January 17, 2012, 1:03pm UTC](https://forum.servoy.com/t/switch-syntax-flexibility/15360/2 "2012-01-17T13:03:09Z")

</div>

Hi Jan,

You can use the following syntax:

```auto
   switch (sDestType) {   

   case "foo":
            ... stuff
                break;
                  
   case "this":
   case "that":
           ... other stuff 
           break;                  
   }

```

( Now you know what the break is for ![;)]( "Wink") )

Hope this helps.
