Modernize for;;-loops

Change-Id: Ic6f86af0d674cc6643fc9eef2aa7431cfdf514f2
diff --git a/dev/js/src/match/treehierarchy.js b/dev/js/src/match/treehierarchy.js
index 0a7bf49..9fc2480 100644
--- a/dev/js/src/match/treehierarchy.js
+++ b/dev/js/src/match/treehierarchy.js
@@ -287,14 +287,14 @@
             if (v.class === "leaf") {
               text.setAttribute('title', vLabel);
 
-              var labelPart = vLabel.split(" ");
-              var n = 0;
-              for (var i = 0; i < labelPart.length; i++) {
-                if (labelPart[i].length === 0)
-                  continue;
+              let n = 0;
+              let tspan;
+              vLabel.split(" ").forEach(function(p) {
+                if (p.length === 0)
+                  return;
 
-                var tspan = that._c('tspan');
-                tspan.appendChild(d.createTextNode(labelPart[i]));
+                tspan = that._c('tspan');
+                tspan.appendChild(d.createTextNode(p));
                 if (n !== 0)
                   tspan.setAttribute('dy', LINEHEIGHT + 'pt');
                 else
@@ -302,7 +302,7 @@
                 tspan.setAttribute('x', v.x - v.width / 2);
                 y += LINEHEIGHT;
                 text.appendChild(tspan);
-              };
+              });
 
               y += LINEHEIGHT;