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