From Wikipedia: “JavaScript templating refers to the client side data binding method implemented with the JavaScript language. This approach became popular thanks to JavaScript’s increased use, its increase in client processing capabilities, and the trend to outsource computations to the client’s web browser.”
“A templating engine is a way for developers to interpole strings effectively. If you are a heavy front-end JavaScript developer, using a templating engine will save you countless hours of unnecessary work.”
A templating engine enables us to use static template files in our application.
Full Stack JS apps typically use the Model/View/Controller paradigm. The “view” portion of this is the rendering of these templates.
The first templating engine I ever used in a project was EJS. It has 13m weekly npm downloads (as of May 2023). Alternatives include Handlebars (12m), pug (1.3m), and many others.
EJS Docs here
Wikipedia (Yes really)