Modernize for;;-loops

Change-Id: Ic6f86af0d674cc6643fc9eef2aa7431cfdf514f2
diff --git a/dev/js/src/tutorial.js b/dev/js/src/tutorial.js
index 2420707..c2f7c69 100644
--- a/dev/js/src/tutorial.js
+++ b/dev/js/src/tutorial.js
@@ -95,27 +95,27 @@
      * Decorate a page with query event handler.
      */
     initQueries : function (d) {
-      var qs = d.querySelectorAll('pre.query.tutorial:not(.unsupported)');
-      var that = this;
-      for (var i = 0; i < qs.length; i++) {
-	      qs[i].onclick = function (e) {
-	        that.useQuery(this,e);
-	      };
-      };
+      let that = this;
+      Array.from(d.querySelectorAll('pre.query.tutorial:not(.unsupported)')).forEach(
+        i =>
+	        i.onclick = function (e) {
+	          that.useQuery(this,e);
+	        }
+      );
     },
 
     /**
      * Decorate a page with documentation links
      */
     initDocLinks : function (d) {
-      var dl = d.getElementsByClassName('doc-link');
-      var that = this;
-      for (var i = 0; i < dl.length; i++) {
-	      dl[i].onclick = function (e) {
-	        that.setPage(this.getAttribute('href'));
-	        return true;
-	      };
-      };      
+      let that = this;
+      Array.from(d.getElementsByClassName('doc-link')).forEach(
+	      i =>
+          i.onclick = function (e) {
+	          that.setPage(this.getAttribute('href'));
+	          return true;
+	        }
+      );    
     },