When a searchbox is submitted, I execute 2 API functions.
document.getElementById('getWeather').onclick = function(){
// init data stream
getAPIdata();
getAPIWeerdata();
};
The first one getAPIdata();
is for the searchbox itself and of course the value can change when the user submits again. So this can get executed more than once.
The second one on the other hand getAPIWeerdata();
gets executed once when the user submits the searchbox.
Can I create something like getAPIWeerdata();.ExecuteOnce