DEV Community

Discussion on: JavaScript - Ternary Operator

Collapse
oskarcodes profile image
Oskar Codes

Well it’s not exactly a perfect alternative, as your solution won’t accept multiple parameters, like this:

console.log("Hello", "World");
Enter fullscreen mode Exit fullscreen mode

But mine will.