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 test(str) {
    var dupa = "king"
    switch (dupa) {
      case "King":
        console.log("• Matched 'xyz' test");
        break;
      default:
        console.log("• Didn't match any test");
        break;
    }
}
test('xyz')
 
    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 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers