const tf = function(x) { switch(x) { default: print("default"); break; case 1: print("1"); break; case 2: print("2"); } } tf(1); tf(2); tf(3);