\n\n\n
40\">\n {{person.name}}\n
\n\n```","suggestedAnswer":[{"@type":"Answer","text":"4"},{"@type":"Answer","text":"2"},{"@type":"Answer","text":"None, it triggers an error"},{"@type":"Answer","text":"3"}],"acceptedAnswer":[{"@type":"Answer","text":"None, it triggers an error"}]}}Medium
How many divs does the following template generate?
<script setup>
import { ref } from 'vue'
const persons = ref([
{ name: "John", familyName: "Smith", age: 42 },
{ name: "Paul", familyName: "Williams", age: 35 },
{ name: "Judith", familyName: "Jones", age: 50 },
{ name: "Kate", familyName: "Brown", age: 22 },
])
</script>
<template>
<div v-for="person of persons" v-if="person.age > 40">
{{person.name}}
</div>
</template>
Author: AdrienStatus: PublishedQuestion passed 373 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!
2
Display the content of a variable in VueJS2
Create a component dynamically in Vue 31
What is the name of the event that is fired when the renderer is done rendering the component?1
What style(s) of API do we have at our disposal in VueJS?2
Vue 3 provides default components to override all classic form components with the goal of performance improvement, a pre-generated basic UI, and pre-established data binding.4
How to use v-do in VueJS2
What is the type of the computed property `computedProperty` in the following code?