Good afternoon,

Using an enumerate loop, I get an error method when trying to fill in a vector with value calculated at each iteration of the loop. Would anyone know how to solve it? Many thanks for your help.

```
grid = collect(range(0.01, length=3, stop=1.0))
X= Vector
for (i, D) in enumerate(grid)
X[i] = i * D
end
```

```
MethodError: no method matching setindex!(::Type{Array{T,1} where T}, ::Float64, ::Int32)
Stacktrace:
[1] top-level scope at .\In[95]:4
```