Hi guys please help me out, my console screen is not printing my console outputs, here is the code : -
And i also wanted to know if i have used long and lat variables correctly in the api link or not ?
$(document).ready(function(){
var long;
var lat;
var fTemp;
var cTemp;
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
long = position.coords.longitude;
lat= position.coords.latitude;
var api="http://samples.openweathermap.org/data/2.5/weather?lat='+lat+'&lon='+long+'&appid=bb77b854a0c13e495d0e46e97477b034";
$.getJSON(api, function(data){
var weatherType =data.weather[0].description;
var kTemp = data.main.temp;
var windspeed = data.wind.speed;
var city = data.name;
fTemp= (kTemp)*(9/5)-459.67;
cTemp = kTemp-273;
console.log(city);
console.log(api);
});
});
}
});