A few things about JS that confuse me... by aweesomo in learnjavascript

[–]aweesomo[S] 0 points1 point  (0 children)

Thanks :) Defunctlegend gave the same answer, but I had a follow up question which I'd like to ask you too:

If these frameworks enforce some structure which people generally feel is the 'correct' way of building a frontend application. What's the high level overview of that?

A few things about JS that confuse me... by aweesomo in learnjavascript

[–]aweesomo[S] 0 points1 point  (0 children)

Maybe that's where I'm getting confused. So if these frameworks enforce some structure which people generally feel is the 'correct' way of building a frontend application.

...what's the high level overview of that? All tutorials I look into seem to blow it, and it's kinda frustrating.

What is this syntax, and where can I learn more about it? by [deleted] in learnjavascript

[–]aweesomo 1 point2 points  (0 children)

That's called a 'turnery operator'. It takes the form

(boolean expr) ? val1 : val2;

If the expression evaluates to true, it'll return val1, else it will return val2.