const publicHolidayChecker = (country, year) => {
  let output
  fetch(`https://www.kayaposoft.com/enrico/json/v1.0/?action=getPublicHolidaysForYear&year=${year}&country=${country}`) // need to format
    .then(res => res.json())
    .then(json => output = json)
    })
    .catch(err => console.log({ err }))
  return output
}

export default publicHolidayChecker

@@ -50,21 +50,14 @@
 %0D%0A  
-let output%0D%0A 
+return
  fet
@@ -174,26 +174,8 @@
 y%7D%60)
- // need to format
 %0D%0A  
@@ -203,50 +203,15 @@
 on()
-)%0D%0A    .then(json =%3E output = json)%0D%0A    %7D
+.length
 )%0D%0A 
@@ -254,25 +254,10 @@
 ))%0D%0A
+
   
-return output%0D%0A
 %7D%0D%0A%0D

return the fetch inside the publicHolidayChecker wrappers