Computer scienceFrontendVue.jsComputable Properties

What are computable properties

Discount to user

Report a typo

A user is eligible for a discount if their age is greater than 60. Determine whether a user is eligible for a discount based on their age using computed property:

Fill in the gaps with the relevant elements
<template>
  <div>
    <p>User Age: {{ userAge }}</p>
    <p>Eligible for Discount: {{ isEligibleForDiscount }}</p>
  </div>
</template>

<script setup>
import { ref,  } from 'vue'

const userAge = ref(65)

const isEligibleForDiscount = computed(() => {
  
})
</script>

Create a free account to access the full topic