Skip to content

Commit a7daa00

Browse files
committed
removed async
1 parent a858311 commit a7daa00

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

script.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ async function fetchTodo(apiUrl) {
1717

1818

1919
// Append data in DOM
20-
async function appendData(data) {
20+
function appendData(data) {
2121
const container = document.querySelector('.append-titles');
2222
data.forEach((item) => {
2323
const newTitle = document.createElement('span');
@@ -29,7 +29,7 @@ async function appendData(data) {
2929
// Helper function to store data from fetch function and pass on to appendData function
3030
const getData = async () => {
3131
const data = await fetchTodo(postApi);
32-
await appendData(data);
32+
appendData(data);
3333
}
3434

3535
window.onload = () => {

0 commit comments

Comments
 (0)