Computer scienceFrontendVue.jsVue 3 SyntaxVue Directives

v-for

Theory

Book list

Report a typo

You want to display a list of book titles in your Vue component. Write the code inside the <script setup> section to define a ref named books that contains an array with three book titles: "Moby Dick", "Wuthering Heights", and "Pride and Prejudice".

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

const books = ref(______)
</script>
Enter a short text
___

Create a free account to access the full topic