Question 28
What happens when the following code is run in the browser (Vue 2 CDN used)?
new Vue({ el: '#app', data: { items: ['apple', 'banana'] }, beforeCreate() { console.log('Before:', this.items); this.items.push('orange'); }, created() { console.log('Created:', this.items); this.items.push('grape'); }, template: '<div v-for="item in items">{{ item }}</div>' });