January 2018
Beginner
658 pages
13h 10m
English
First, we do need to remove the comments of geocodeAddress in the app.js.
Next, we'll go ahead and take the console.log statement in the success case and replace it with a console.log call that will print the formatted address:
geocode.geocodeAddress(argv.address, (errorMessage, results) => { if (errorMessage) { console.log(errorMessage); } else { console.log(results.address); }});
This will print the address to the screen, so we know exactly what address we're getting weather data for.
Now that we have our console.log printing the address, we can take the getWeather call, and move it right below the console.log line:
geocode.geocodeAddress(argv.address, (errorMessage, results) => { if (errorMessage) ...