Answers for "how to check if function is running js"

1

how to check if function is running js

var functionIsRunning = false;

function myFunction() {
    if (!functionIsRunning) {
        functionIsRunning = true;
    }
}
Posted by: Guest on May-08-2020
0

how to check if function is running js

function getdata(){
var cityName = document.getElementById('data').value;
fetch("https://api.openweathermap.org/data/2.5/weather?q=karachi&appid=fe09716e3af279e3e7bcc6c136b6f6a2")
.then((response) => {return response.json();
}) 

 .then(data => {
console.log(data);
 })
Posted by: Guest on September-04-2021

Code answers related to "how to check if function is running js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language