Javascript examples for Array:join
Join array elements and separator
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){/*from w ww . j ava2 s. co m*/ var values = []; values.push('agency_street'); values.push(null); values.push(''); values.push('agency_zip'); console.log(values.filter(x => x).join(', ')); } </script> </head> <body> </body> </html>