ObserveableArray for loop


#1

I have a basic question about what is the best practice to iterate through an ObserveableArray. Here are two approaches I’ve been using.

        const array = jobs.slice();
        for (let job of array) {
        ...
        }

Or

jobs: ObserveableArray<MyType>;
...
jobs.forEach( job => { ... });

#2

I love the forEach syntax, but is generally WAY slower than a regular for loop https://jsperf.com/for-vs-foreach/37