• Add a header to the lab with "Larla's List Of Countries"
  • Using JS, inject an ordered list into the div with the class "content"
  • Give your new ordered list the class "countries"
  • Design the following function to run on the click of a button from the index page
  • Select 25 random countries from your list by writing a separate function that makes use of Math.random
  • You may need to explore how to do this by looking it up at MDN
  • Make sure the selection is unique
  • Using a .forEach or a .map function, inject a new list item for each country into the ol from #3
  • Display the name of each country in a normal font weight
  • Display the country code for each in a bold font weight
  • Log the unselected countries to your console
  • Make sure your random countries display in alphabetical order
  • Guarantee a given country cannot appear twice in any given click of the button
  • Use JS to attach an event listener rather than using the onclick attribute on a button
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.