I’m trying to create a Table based on “width”(columns) and “height”(rows) but I just can’t get it right.
So is there Something wrong with my code?
Code:
for(var i=0;i<width;i++){
$('#map').append(
'<tr>'+
for(var e=0;e<height;e++){
}
+'</tr>'
);
};
Your code is invalid, you can’t have a for loop there. Try rearranging it a bit.
or even better: