JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://builds.handlebarsjs.com.s3.amazonaws.com/handlebars-bf99352.js"></script>
<div id="output"></div>
<script type="template/handlebars" id="template">
{{#each .}}<br>
-{{@key}},{{@index}},{{@first}},[{{@last}}]-<br>
{{#each .}}<br>
={{@key}},{{@index}},{{@first}},[{{@last}}]=<br>
{{/each}}<br>
{{/each}}
</script>
JavaScript
var template = Handlebars.compile(document.getElementById('template').innerHTML);
document.getElementById('output').innerHTML = 'object #each object no {{@last}} =======' + template({0: 'a', 1: 'b', 2: 'c'});
document.getElementById('output').innerHTML += 'array #each array got {{@last}} =======' + template([0,1,2]);
document.getElementById('output').innerHTML += 'inner #each object should no {{@last}} =======' + template([
{a: 'b', c: 'd'},
{e: 'f', g: 'h'},
{i: 'j', k: 'l'}
]);