Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<script src="//fb.me/react-with-addons-0.11.0.js"></script>
 
    function douche(event_name) {
      
      switch (event_name) {
        case event_name.test("word"):
          alert('Word Document!');
          break;
        case event_name.test("Excel Document"):
          alert("Excel Document!");
          break;
        default: 
          alert('No match');
          break;
      }
    } 
douche('word');
Output

This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account

Dismiss x
public
Bin info
anonymouspro
0viewers