-
Visit the page https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from
-
Extract the collection of paragraphs from this page into a variable. Note: you can use
document.getElementsByTagName('p');. -
Now use the array
mapfunction to show each element'sinnerText. Ifmapis unavailable, that is because the collection is not a JavaScript array, but an array-like object retrieved from the DOM. Use one of the Array functions mentioned to convert it, then usemap().
-