var a = true; var b = false; switch (a) { case true: var b = 2; break; case false: var c = 3; break; }