Skip to content

Commit

Permalink
wandering around
Browse files Browse the repository at this point in the history
  • Loading branch information
hellophia committed May 10, 2024
1 parent 7bad132 commit 393c84c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions exercise friend/helper.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@
return { stretch, switch: switchVal, time, reps: parseInt(reps), group };
});
console.log(items);
createElements(items);
})
.catch(error => console.error('Error fetching the data:', error));

function createElements() {
function createElements(data) {
const stretchList = document.getElementById('stretchList');

data.forEach(item => {
Expand Down Expand Up @@ -89,8 +90,6 @@

xhr.send(data);
}

window.onload = createElements;

</script>

Expand Down

0 comments on commit 393c84c

Please sign in to comment.