How to use different syntax of underscore JS template engine?

Underscore JS template engine used to compile javascript template into such a function to render the content with HTML file.

Underscore JS uses different syntax to render content into HTML format.

Syntax of template method in underscore JS,

There will be three different syntax underscore js used,

  1. <%= %> Interpolate HTML tag to normal text in result.
  2. <%- %> Keep HTML tag in result.
  3. <% %> used to define logical conditions for the execute code.

    You can use syntax based on your requirement.