Testing the API

هذا الالتزام موجود في:
2025-08-19 00:52:49 +03:00
الأصل f234eb7344
التزام dbf92521ff

9
app.js
عرض الملف

@@ -1,3 +1,8 @@
function getTimes(city, countryCode){ async function getTimes(city, countryCode){
console.log("Starting . . .")
const response = await fetch(`http://api.aladhan.com/v1/timingsByCity?city=${city}&country=${countryCode}`)
const parsedResponse = await response.json();
console.log(parsedResponse.data.timings)
} }
document.getElementById("getTimes").onclick = ()=> getTimes(city.value, code.value)