Modernize ES for-loops and remove problematic for-in loops

This slightly modifies the behaviour of errors (see init.js)

Change-Id: I1aab691d5b7e8167b6213378bdd9139c133202cd
diff --git a/dev/js/src/state.js b/dev/js/src/state.js
index 78cd4cc..a5ab7d8 100644
--- a/dev/js/src/state.js
+++ b/dev/js/src/state.js
@@ -54,9 +54,7 @@
     set : function (value) {
       if (value != this.value) {
         this.value = value;
-        for (let i in this._assoc) {
-          this._assoc[i].setState(value);
-        }
+        this._assoc.forEach(i => i.setState(value));
       };
     },