console.log('this doesn't work!') (false ? console.log : console.error)('this will fail with a TypeError') >> Uncaught TypeError: console.log(...) is not a function console.log('this works!') ;(true ? console.log : console.error)('hello world')