Skip to content

dci-fbw-wd-24-d07-a/spa-012-asynchronous-programming-fetch-CihanUnall

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fetch and sort data

Here we will practice Promises through the Fetch API.

Tasks

Your task is to load the list of words found in data.txt, sort it and display it on the page.

Task 1

Working in main.js;

  1. Create a function called processData
  2. When the <button> is clicked, it should run processData

Task 2

The processData function should;

  1. Fetch the contents of the file data.txt
  2. Convert the fetched text data into an array, with each line of the text as a separate array item
  3. Sort the array alphabetically
  4. Display the sorted array as a <ul> list on the web page, with each array item as an <li> element

Expected Result

Expected result

About

dci-fbw-wd-24-d07-a-classroom-8f29a6-spa-012-asynchronous-programming-fetch-spa-012-asynchronous-pro created by GitHub Classroom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 52.1%
  • HTML 30.8%
  • CSS 17.1%