# lu-for `lu-for` is used to render a list of elements by iterating over an array or an object. ## Basic Usage ```html
``` ## Array Iteration ### Accessing Index You can access the current index by using the `(item, index)` syntax. ```html
{{ index + 1 }}. {{ item }}
``` ### Array of Objects Iteration works seamlessly with arrays of objects. ```html

{{ user.name }} ({{ user.email }})

``` ## Object Iteration `lu-for` can also be used to iterate over the properties of an object. The order of iteration is consistent with `Object.keys()`. ```html
{{ index }}. {{ key }}: {{ value }}
``` ## Iterating Over a Range You can also use an integer with `lu-for`. The count starts at `1`. ```html {{ n }} ``` ## Destructuring Objects and arrays can be destructured in the alias position, one level deep. ```html

{{ id }}: {{ name }}

``` ## Nested Loops `lu-for` can be nested to iterate over multi-dimensional data structures. ```html

{{ category.name }}

``` ## Using `lu-for` with `