JSFiddle - React, Tailwind, and code Playground

by ChaseWest

JavaScript

var foo = 1;
switch (true) { // invariant TRUE instead of variable foo
    case test():
        alert('yes');
        break;
    default:
        alert('not');
}


function test(){
    console.log("test");
    return true;
}