I’ve edited your post for readability. When you enter a code block into the forum, precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.
$(document).ready(function(){
var lat;
var long;
var api ="https://fcc-weather-api.glitch.me/api/current?";
var fTemp;
var cTemp;
var kTemp;
var tempSwap=true;
var weatherType=data.weather[0].description;
$.getJSON(“http://ip-api.com/json”,function(data2){
lat=data2.lat;
long=data2.lon;
Your first AJAX call is breaking because you’re mixing HTTP with HTTPS. The URL "http://ip-api.com/json" is not secure, so you the browser prevents the request from going out. This means you don’t have the coordinates for the second API call. Use the native geolocation API instead.