function Location(city, data) {
    this.search_query = city;
    this.formatted_query = data[0].display_name;
    this.latitude = data[0].lat;
    this.longitude = data[0].lon;
    this.region = data[0].address.country_code.toUpperCase();

}
// constructor function formate the location responed data
constructor function formate the location responed data
constructor function formate the location responed data
function Location(city, data) {
    this.search_query = city;
    this.formatted_query = data[0].display_name;
    this.latitude = data[0].lat;
    this.longitude = data[0].lon;
    this.region = data[0].address.country_code.toUpperCase();
}
function Location ( city , data ) { this . search_query = city ; this . formatted_query = data [ 0 ] . display_name ; this . latitude = data [ 0 ] . lat ; this . longitude = data [ 0 ] . lon ; this . region = data [ 0 ] . address . country_code . toUpperCase ( ) ; }
constructor function formate the location responed data
constructor function formate the location responed data