Skip to content

Commit ac733c0

Browse files
Kara HowesKara Howes
authored andcommitted
added catch and started filter function
1 parent 3dae05e commit ac733c0

1 file changed

Lines changed: 13 additions & 7 deletions

File tree

code/script.js

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,18 @@ fetch(repoURL)
55
.then((response)=>{
66
return response.json()
77
})
8-
.then((repo)=>{
9-
console.log(repo)
10-
projects.innerHTML = `The name of your first project was ${repo[0].name}`
8+
.then((forked)=>{
9+
console.log(forked)
10+
projects.innerHTML = `The name of your first project was ${forked[0].name}`
11+
const forkedProjects = forked.filter(()=>)
1112

12-
repo.forEach(reponames => {
13-
projects.innerHTML += `<p> Project name ${reponames.name}</p>`
14-
});
13+
1514

16-
})
15+
//repo.forEach(reponames => {
16+
//projects.innerHTML += `<p> Project name: ${reponames.name}</p>`
17+
//});
18+
19+
})
20+
21+
.catch((error) => console.error(error))
22+
.then(() => console.log('Request finished'));

0 commit comments

Comments
 (0)