Use weather API to get information in JavaScript + jQuery Please can any code experts review and improve my code?

HTML

&lt;!DOCTYPE html&gt;
&lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;API&lt;/title&gt;
    &lt;meta charset="UTF-8"&gt;
    &lt;meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"&gt;
    &lt;link rel="stylesheet" href="//fonts.googleapis.com/css?family=font1|font2|etc" type="text/css"&gt;
    &lt;link rel="stylesheet" type="text/css" href="style.css"&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;h1 id="test"&gt;&lt;/h1&gt;
      &lt;div class="weather-container"&gt;
        &lt;img id="icon"&gt;
        &lt;h1 id="weather"&gt;&lt;/h1&gt;
        &lt;p&gt;Description: &lt;span id="desc"&gt;&lt;/span&gt;&lt;/p&gt;
        &lt;p&gt;Temperature: &lt;span id="temp"&gt;&lt;/span&gt;&lt;/p&gt;
      &lt;/div&gt;
      &lt;script src="mousetrap.js"&gt;&lt;/script&gt;
      &lt;script src="moment.js"&gt;&lt;/script&gt;
      &lt;script src="jquery.js"&gt;&lt;/script&gt;
      &lt;script src="script.js"&gt;&lt;/script&gt;
  &lt;/body&gt;
&lt;/html&gt;


That's the HTML. It is just mostly tags with id to output info.

JavaScript

var ask = prompt("Type in your city or town that you want the weather for. Please make sure you write the first letter as capital letter and you spell it right.");
$.getJSON("https://api.openweathermap.org/data/2.5/weather?q="+ask+"&amp;units=metric&amp;appid=32b8cd17f2ff5d84d72342dd7408bab2", function(data) {
    console.log(data);
    var icon = "https://openweathermap.org/img/w/" + data.weather[0].icon + ".png";
    var weather = data.weather[0].main;
    var desc = data.weather[0].description;
    var temp = data.main.temp;
    var temp1 = temp + "℃"
    $("#icon").attr("src", icon);
    document.getElementById('weather').innerHTML = weather;
    document.getElementById('desc').innerHTML = desc;
    document.getElementById('temp').innerHTML = temp1;
});


If there is any other language than jQquery that I can use to get JSON files from API, please let me know because I find jQuery quite confusing.
Response to your question


  If there is any other language than Jquery that I can use to get json files from api, please let me know because i find Jquery quite confusing :-).


As was mentioned in a comment (as well as a link-only answer that has since been deleted), there are alternatives, including but not limited to:


vanilla JavaScipt: 


with XMLHttpRequest - refer to Using XMLHttpRequest on MDN
with the fetch API

other libraries, some of which are listed on youmightnotneedjquery.com/:


reqwest
then-request
superagent



General review

User experience

You didn't state whether the specification was part of an assignment/task or just something you came up with, but the UX might be improved by having the prompt and Ajax request triggered by an event like a mouse click instead of page load.

If such a change was implemented, then it would be wise to cache the DOM references in variables instead of querying the DOM each time- e.g. 

var weatherEl = document.getElementById('weather');
var descEl = document.getElementById('desc');
var tempEl = document.getElementById('temp');

//function to prompt

//AJAX response callback
function ajaxResponse(data) {
    //parse data
    //...
    weatherEl.innerHTML = data.weather[0].description;
    descEl = data.weather[0].description;
    tempEl.innerHTML = data.main.temp + "°C";
}


That way, the lines can be shorter, the DOM won't get queried each time, and you can likely eliminate those variables that are assigned and then only used once. 

Perhaps a template system would help improve the process of updating the DOM elements instead of having to update each item individually.

Handling other responses and errors

The code above doesn't appear to (gracefully) handle any response other than a successful call to the API endpoint. When the user types in a city that the API doesn't recognize, then a 404 response is returned. If you continue to use the jQuery library, then a .fail() callback could be specified (see the $.getJSON() documentation for an example to handle that. Also, if a server error occurred, then a 5xx response might be returned.

Additionally, the code assumes that data.weather will be an array and have at least 1 element. What happens if either of those are not true? While it may seem implausible it may be possible and something to guard against.

Extra libraries

The code includes mousetrap.js and moment.js - I presume those correspond to the libraries Mousetrap and MomentJS, but it doesn't appear that those libraries are used by the code. Unless those are used by other code not included, those libraries can be removed to save the users time loading the page.