> For the complete documentation index, see [llms.txt](https://squirrelly.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://squirrelly.gitbook.io/docs/getting-started/whats-a-template-engine.md).

# What's a template engine?

A template engine is a program that takes a template and data, and returns the template filled with the data.&#x20;

Many template engines work by turning the template into a function where one of the parameters is the data. This function can be cached and saved, so the template engine doesn't need to re-parse the template again.

## Example

```javascript
var template = "My favorite template engine is {{engine}}"
Sqrl.Render(template, {engine: 'Squirrelly'})
// My favorite template engine is Squirrelly
Sqrl.Render(template, {engine: 'not Dust'})
// My favorite template engine is not Dust
```
