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/api.js b/dev/js/src/api.js
index a92d73d..7a85dc0 100644
--- a/dev/js/src/api.js
+++ b/dev/js/src/api.js
@@ -167,9 +167,9 @@
           return;
         };
 	      if (json !== null && json["errors"] !== null) {
-	        for (var i in json["errors"]) {
-	          KorAP.log(json["errors"][i][0], json["errors"][i][1] || "Unknown");
-	        };
+	        json["errors"].forEach(
+            e => KorAP.log(e[0], e[1] || "Unknown")
+	        );
 	      }
         else if (this.status !== 200) {
         	KorAP.log(this.status, this.statusText);