0👍
This is because your array has 10 undefined values therefore it does not actually have a length property, if you make sure that there is some value in each element then you will be able to get the array.
It’s a feature of JS and how the length property on the array is computed.
- [Vuejs]-How do i use spread operator for multiple vuex modules?
- [Vuejs]-Vue-select, buefy CSS not working on production | NUXT.JS
0👍
You can try to parse it to an array again:
// arr is an array with contains 10 items
var arr = JSON.parse(JSON.stringify(this.typeOptions));
Then, continuing with the loop…
- [Vuejs]-Vue cannot acces object props
- [Vuejs]-How to receive function parameters for key value type functions in js?
Source:stackexchange.com