how to declare and retrieve variable in underscore template code example Example: how to declare and retrieve variable in underscore template <% var var1 = 'value'; %> <%= var1 %>