Use a normal for loop

The alternative being combining `for…in` with `hasOwnProperty` I thought using the vanilla loop was preferable.
Merge pull request #5759 from elia/patch-1

Use a normal for loop in tabs.js