I have a boolean return from a function which suggests 2 checks and according to the result a message is displayed
example:
<script>
function guessTheNumber(p1) {
const test = 5;
return p1 > 6 || p1 === test ;
}
</script>
displayed text
{{ greater (if first expression is executed) || {{ equal (if second expression is executed) }}
These conditions can be expressed in the markup...
{{ p1 > 6 ? 'greater than 6' : (p1 === 5 ? 'equal to 5' : 'neither' ) }}
Or, the way I prefer, in a method that's understood to produce a string for the markup...
<!-- in the markup -->
{{ theThingAboutP(p1) }}
// in methods: {}
theThingAboutP(p1) {
if (p1>6) return 'greater than 6';
if (p1===5) return 'equal to 5';
return 'neither';
}