function foo(x, FooBar, some_condition) { x = new FooBar(some_condition ? 1 : 2); }