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/panel.js b/dev/js/src/panel.js
index eee7a00..f9fb979 100644
--- a/dev/js/src/panel.js
+++ b/dev/js/src/panel.js
@@ -104,11 +104,10 @@
      * Delete a closed view from panel
      */
     delView : function (view) {
-      for (i in this.views) {
-        if (this.views[i] === view) {
-          this.views[i] = undefined;
-        }
-      }
+      this.views.forEach(function(e, i, a) {
+        if (e === view)
+          a[i] = undefined;
+      });
     },
 
     /**