Template generation produces structured text by combining fixed content with dynamic data. In JavaScript, repeatedly appending generated pieces inside a loop can require increasingly costly allocation and copying; under naïve copying, the work grows quadratically. section 2.2.1
<h1>{{title}}</h1>
<p>Hello {{name}}, you have {{count}} unread messages.</p>This HTML template marks dynamic values with placeholders. section 2.2.1
Building a user table
A loop appends one HTML row per user with +=. This illustrates how a familiar rendering task can expose the cost of repeated concatenation. section 2.2.1




























