Is there any limitations for 'for loop' in Javascript? | XM Community
Question

Is there any limitations for 'for loop' in Javascript?

  • 19 July 2019
  • 1 reply
  • 60 views

In my code, I'm trying to create and fill a HTML table for x times, but it loops maximum 4 times

for (var i = 0;i<x;i++) {
var row_element = document.createElement("TR");


for (var j=0;j<3;j++) {
var data_element = document.createElement("TD");

var random_value = random_result[i]
....
Thanks in advance

1 reply

Userlevel 7
Badge +27
No, there aren't any limitations. My guess is you are looking at the nested loop since it loops 4 times.

Leave a Reply