View getWeather.js
function getWeather(latitude, longitude) {
$.ajax({
type: 'GET',
url: 'https://fcc-weather-api.glitch.me/api/current?lat='
+ latitude + '&lon=' + longitude,
async: false,
contentType: "application/x-www-form-urlencoded",
cache: false,
dataType: 'json',
success: function(data)