<div></div>
<script id="tpl" type="text/x-handlebars-template">
	<p>Tags: {{listArray tags}}</p>
</script>
Handlebars.registerHelper('listArray', function(arr) {
    var out = [];	
    for (var i = 0, l = arr.length; i < l; i++) {
        out.push(arr[i]);
    }
    return out.join(', ');
});

$(function() {
	var data = {
		tags:[
			'javascript',
			'css',
			'handlebars'			
		]
	}

	var template = Handlebars.compile($('#tpl').html());
	$('div').append(
		template(data)
	);
});


External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. //cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js
  2. //cdnjs.cloudflare.com/ajax/libs/handlebars.js/3.0.0/handlebars.min.js