I am having trouble matching two strings in jQuery:
var option = ""; $.each(data, function(key, value) { option += "<option "; if(selected == value) { option += "selected"; } option += ">" + value + "</option>"; });
and the values ββare the same lines.
Is there any other way to compare two strings, or maybe the selected and the values ββare different types?
source share