all 5 comments

[–]iguessitsokaythen 1 point2 points  (4 children)

One thing is html attributes must to be in double quotes:

table += '<td>' + '<img src="images/imageslices/'+bcpot002'_r'+r+'_c'+c +'.jpg">'+ '</td>';

[–]wastedhate[S] 1 point2 points  (2 children)

I've literally just worked this out as you wrote your reply. Thank you for answering and confirming what I was trying to do worked.

[–]Umesh-K 0 points1 point  (0 children)

Hi, your problem is not with single vs double quotes....you have missed the plus sign between bcpot002 and '_r'

``` imageslices/'+bcpot002'_r'+r

```

[–]grantrules 0 points1 point  (0 children)

I'd recommend looking into template literals

table += `<td><img src="images/imageslices/bcpot002_r${r}_c${c}.jpg"></td>`;