fred == 42 ? (config = 1) : (config = 2); // this works fred == 42 ? config = 1 : (config = 2); // also works fred == 42 ? (config = 1) : config = 2; // syntax error