We usually do it this way: joinStr = joinStr || ', ';