Difference two selector with a href # plus id

What is difference between two selector first is working second is not but seems same?
first
$('#'+dest)

second
$("#' + dest +'")

Thanks

The first one is the symbol # concatenated with the value of the dest variable. The second one is the literal string “#’ + dest +’”.

2 Likes