1var functionIsRunning = false;
2
3function myFunction() {
4 if (!functionIsRunning) {
5 functionIsRunning = true;
6 }
7}
1function getdata(){
2var cityName = document.getElementById('data').value;
3fetch("https://api.openweathermap.org/data/2.5/weather?q=karachi&appid=fe09716e3af279e3e7bcc6c136b6f6a2")
4.then((response) => {return response.json();
5})
6
7 .then(data => {
8console.log(data);
9 })