JavaScript AJAX Basics (retiring) AJAX and APIs Create a callback function

Furkan Demirtürk
Furkan Demirtürk
7,940 Points

I stuck there

What can ı do

$(document).ready(function() {
  var weatherAPI = '';
  var data = {
    q : "Portland,OR",
    units : "metric"

  function showWeather (weatherReport) {
<!DOCTYPE html>
  <meta charset="utf-8">
  <title>What's the Weather Like?</title>
  <script src="jquery.js"></script>
  <script src="weather.js"></script>
  <div id="main">
    <h1>Current temperature: <span id="temperature"></span>&deg;</h1>

1 Answer

Andrew Hinkson
Andrew Hinkson
Full Stack JavaScript Techdegree Student 16,002 Points

You are very very close. I would look very closely at what your passing into .text(). As your code stands you are passing in a string it needs to be a reference to the data that you want in the api.