Skip to content

Commit 5316a91

Browse files
Adam JahrAdam Jahr
authored andcommitted
L5 solution
1 parent 2bd501d commit 5316a91

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ <h1>{{ product }}</h1>
2525
<li v-for="detail in details">{{ detail }}</li>
2626
</ul>
2727
<ul>
28-
<li v-for="size in sizes">{{ size }}</li>
28+
<li v-for="(size, index) in sizes" :key="index">{{ size }}</li>
2929
</ul>
3030
<div v-for="variant in variants" :key="variant.id">{{ variant.color }}</div>
3131
</div>

main.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ const app = Vue.createApp({
55
image: './assets/images/socks_blue.jpg',
66
inStock: true,
77
details: ['50% cotton', '30% wool', '20% polyester'],
8+
// solution
89
sizes: ['S', 'M', 'L', 'XL'],
10+
// solution
911
variants: [
1012
{ id: 2234, color: 'green' },
1113
{ id: 2235, color: 'blue' },

0 commit comments

Comments
 (0)