Search code examples
javascriptquotes

Cannot get quotes right


I am having a hard time getting the quotes right in this code. Don't work so I am guessing the quotes are wrong.

html+='<img src="' + noteDirectory + '"/ "' + currentNote + '".png>'";

Solution

  • What you need is this:

    html+='<img src="' + noteDirectory + '/' + currentNote + '.png">';
    

    A better way to look at it would be: You just need " after src= and between .png and the last >