Solution Review: Add HTML Tags and Bind Data

This review provides a detailed analysis to solve the 'Add HTML Tags and Bind Data' challenge.

We'll cover the following

Solution

Solution

Explanation

Let’s discuss the above code to better understand how it works.

  • From line 3 to line 8, we are appending three h1 tags inside the body tag using the append() function.

  • In line 9 and line 10, we are selecting the all h1 tags inside the body tag.

  • In line 11, we are mapping every single data element to the selected h1 tag.

  • In line 12, we are associating text with h1 tags based on its mapping with the mydata array.