I have a list of checkboxes for CITY (class='city') . Now I am creating an array which store all the city checked values. my code is:
$('.city:checked').each(function() {
city.push(this.value);
});
alert(city);
Result: mumbai,delhi
But I want result like 'mumbai','delhi' in array. please suggest,
toString()function is called on it which will display it comma separated.