0
What's the proper syntax? (Javascript)
div.style.background = "url('" +images[0]+"') no-repeat"; How to put the image path? Help asap. Thanks!
2 odpowiedzi
+ 1
Use template literals
https://www.sololearn.com/learn/JavaScript/2969/
div.style.background = `url(${images[0]}) no-repeat`;
0
For more information please see the example:
https://code.sololearn.com/WSLZPpBIFgr7/?ref=app