Can anyone explain how these two differ from each other in simple words?
In the frameworks function, the two commented lines are the different solutions to this challenge
Array.map callback function does take as first parameter the current element of the array you are iterating over in your case ‘item’ and second one is the ‘index’ for each element. 0 ,1… up to the length of the array.
var new_array = arr.map(function callback(currentValue[, index[, array]]) {
// Return element for new_array
}[, thisArg])
This time map gets every ‘item’= ‘React’, ‘Angular’, ‘Ember’… from frontEndFrameworks array and each ‘index’ = 0,1,2 … and does return an jsx
<li key = 0> 'React' </li>
element, for each iteration, with key attribute and uses jsx assigning style for each index until the array is exhausted.
First li element has key= 0 …second li element has key = 1 and so on … you can guess what is returned here for {item} .
[quote=“IAmRC1, post:1, topic:216100”]```
[/quote]
it is the same map function
only in first it is assign to key the index as uniqe key and in seconds is string from array