MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/code/comments/1bc9zwc/question_about_fetch/kuux5bv/?context=3
r/code • u/OsamuMidoriya • Mar 11 '24
In the example we are fetching Pokémon from the pokeAPI
why does he add a if statement if he already has a catch and why do we use await here
if
await
7 comments sorted by
View all comments
Show parent comment
1
he says why he use if but not why if and try are both used
try
View all comments
Show parent comment
1
u/OsamuMidoriya Mar 14 '24
he says why he use
ifbut not whyifandtryare both used