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...
We'll cover the following...
Solution
Explanation
Let’s discuss the above code to better understand how it works.
-
From line 3 to line 8, we are appending three
h1tags inside thebodytag using theappend()function. -
In line 9 and line 10, we are selecting the all
h1tags inside thebodytag. -
In line 11, we are mapping every single data element to the selected
h1tag. -
In line 12, we are associating text with
h1tags based on its mapping with themydataarray.