The Delightful World of Vue
Computed Properties
  Start your All-Access Pass to unlock this challenge
Buy Access Login

Challenge 1 / 1

Let's say we have a component that contains two data properties: firstName and lastName. To make our lives easier, we want to display these names using a single name variable in the template:

<template>
    <span :class="$style.component">{{ name }}</span>
</template>

What code would accomplish this in the best way?

Skip challenges and go to theNext Chapter

Turn Challenges Off?

All further challenges will be skipped automatically.
You can re-enable challenges at any time on this page or from your account page.