diff --git a/guide/english/vue/control-flow/index.md b/guide/english/vue/control-flow/index.md index a72f346771..ab89ece911 100644 --- a/guide/english/vue/control-flow/index.md +++ b/guide/english/vue/control-flow/index.md @@ -109,3 +109,19 @@ app.list.push("something else"); ``` As expected, the page rendered now has our brand new item! + +### Accessing current index in loops + +`v-for` also supports an optional second argument for the index of the current item: + +```html +
+ +
+``` +This way, we can use `index` to style the first, last or even/odd list elements differently, or apply extra logic to our component. +