How to concatenate variable in string in javascript

var atLeastOneIsChecked = jQuery('input[name="addon-"'+abc+']:checked').length;
                                                    ^
                                                    |

You used the closing " at the wrong place

var atLeastOneIsChecked = jQuery('input[name="addon-'+abc+'"]:checked').length;
                                                           ^
                                                           |

Try this -

var atLeastOneIsChecked = jQuery("input[name='addon-"+abc+"']:checked").length ;

Concatenate like this:

var atLeastOneIsChecked = jQuery('input[name="addon-'+abc+'"]:checked').length ;