Writing Functions

When the value on either side of the + is a string the + means concatenation (join together into one string).

So in this case it takes the value of previewPic.src and adds the string ‘url"’ to the front of it and ‘")’ to the end of it.

If the value of previewPic.src was ‘img.png’ you’d end up with ‘url(“img.png”)’