<% var str = ""; if(isAllSelected){ str = "You've selected all contacts to export."; } else{ if(count ===1){ str = "You've selected 1 contact to export."; }else{ str = "You've selected "+count+" contacts to export."; } } %>