I'm trying to taking an array, order that array by version, and then moving all versions that begin with 'ipad' to the end of the list.
snippet from single file vue.js component:
computed: {
orderedUsers: function () {
let newArray = sortBy(this.jobs, 'version').reverse()
for (i in newArray) {
if (i.version.startsWith('iPad')) {
newlist.push(newlist.splice(i, 1)[0]);
}
}
return newArray
},
error:
vue.runtime.esm.js?e832:619 [Vue warn]: Error in render: "ReferenceError: i is not defined"
Not sure if this is a js question or a vue.js question
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…