weather.fetchWeather("Yelagiri");
Instead of typing this Yelagiri manually, I want the output (area) of the following snippet to be the input of the function.
function processRequest(e) {
if (xhr.readyState == 4 && xhr.status == 200) {
var response = JSON.parse(xhr.responseText);
var city = response.address.city;
console.log(city);
var area = city;
return;
thanks.