@ozair55
Nothing here yet.
Nothing here yet.
No blogs yet.
hi Abhirajb, I am not able to understand why you are assigning immediately invoking function to this function, and you are passing el argument to the function, what does the el refer to? const arrayToHtmlList = (arr, listID) => (el => ( (el = document.querySelector('#' + listID)), (el.innerHTML += arr.map(item => <li>${item}</li>).join('')) ))(); Wouldn't a simple function as follows serve the same purpose? const arrayToList = (arr, list)=>{ let el = document.getElementById(list); arr.forEach(item=>el.innerHTML+=<li>${item}</li>) }