Chapter 19. Templates: filling placeholders with data

This chapter covers

  • Replacing one string with another
  • Repeating code with while loops
  • Using templates to separate HTML from JavaScript
  • Embedding templates in web pages
  • Transforming one array into another with map

You want your websites to be easy to navigate and a pleasure to use. Their designs should consider what content to include on each page, its accessibility and usability, the look and feel, and the overall user experience. Members of your team, building and maintaining a site, will have different strengths; even as a team of one, it makes sense to focus on different aspects of a site at different times.

Get Programming with JavaScript has favored a modular approach to developing ...

Get Get Programming with JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.