Message from JavaScript discussions

December 2020

— It is (bool) ? "code" : "code"


Tho send me a documentation link anyway, can't find a ternary ejs operator on google, for somewhen it'll be useful

— (bool) ? <- if true "code" : <- else "code"

— Ye, he has just no question mark which might be ejs specific idk, just used it with webpack yet to loop or inject, no conditions

Message permanent page

— But in ejs ternary sucks

— Looks so

— You cant split it in multiple rules

— Most of the time I use all logic in the backend

— Well ejs is Backend too I'd guess, wouldn't use it for csr at least xd

— Yeah but like I don't like to use code in my templates

— Think its messy

— Better make the statements in the backend and render the result in the template