.  function getWeather ( user ) { return new Promise ( ( resolve , reject ) => { $ . getJSON ( { url : getLocationURL ( user . location . split ( ',' ) ) , success : resolve , error : reject , } ) } ) } 