Vue · Junior · Question 11 of 75
Which expressions are allowed inside template bindings?
- ✓Correct answer: Single JavaScript expressions, e.g.
{{ ok ? 'YES' : 'NO' }}- not statements likeiforlet - 2Any JavaScript, including
forloops and variable declarations - 3Only variable names, no expressions at all
Explanation
Each binding must evaluate to a value. Complex logic belongs in a computed property or a function in <script setup>.