Sep 2, 2018 · 1 min read
request(url, function (err, response, body) {
if(err){
console.log(err);
}
else {
let weather = JSON.parse(body)
let message = `it’s ${weather.main.temp} degrees in ${weather.name}`;
console.log(message);
}
});
showing an error that cant read property of {temp} not defined