'forEach Array Method returning only the last element of the array
I am getting each form detail from local storage to render them using the forEach array method, I am only getting the last iteration of the forEach loop.But when i console.log the array i find them all correctly.
Solution 1:[1]
When you loop through an array, make sure you also append within the loop.
Hope this helps!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Mhiko Leeps |
