Edit in JSFiddle

$(document).ready(function () {
    var output = $("#output");    
    var template = $("#test5").html();
    
    // data5 has two elements "data", an array of fruit, 
    // and doFunc, an anonymous function that will process things given to it
    var data5 = { 
        data : [ 
            { name : 'Apple' }, 
            { name : 'Banana'}, 
            { name : 'Cherry'}],
        doFunc : function() {
            // VERY IMPORTANT to pass render as a param!
            return function(text, render) {
                // render the passed value or else it renders as literal text
                return "<b>" + render(text) + "!</b>"
            }
        }
    };
    
    html = Mustache.render(template, data5);
    output.append(html);
});
<h2>Example 5 : Binding an array of data to a function in a template</h2>

<div id="output"></div>

<script type="text/html" id="test5">
    <!-- loop through the data array -->
    {{#data}}
        <p>
            <!-- call the function doFunc, passing in the array item value -->
            {{#doFunc}}{{name}}{{/doFunc}}
        </p>
    {{/data}}
    
</script>