I have an array
pics = ["url1", "url2", "url3"]
I want want to be able to set the src attribute of an image to an array element like so:
<img src = pics[0]>
Problem is that html does not recognize that I am want the string element pic[0] not literally "pic[0]", so it throws an error
Uncaught TypeError: Cannot set property 'src' of null
Thanks