From the course: Mastering Web Developer Interview Code

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Have you used JavaScript templates?

Have you used JavaScript templates?

- [Instructor] Using JSON and AJAX is great, but if you're going to parse more complex data, it's better and more common to use a templating engine. Now, templating is a really common task in JavaScript because it makes parsing things a little bit easier. It's part of several languages like React, and something implemented in ES6. In this video we'll examine the concept, as well as a specific implementation called EJS. Now EJS stands for embedded JavaScript, and is one of the templating implementations popular in Express.js. However, the concept is similar in different implementations, so once you learn to work with embedded JavaScript templates, it will be super easy to learn the difference in some of the other implementations. Here's the EJS website, where you can get more information about this implementation. We're going to use this on our current project, and right now you'll notice that this particular file has…

Contents