It’s the variable for the divs in the HTML. I’m sorry, I’m not sure what the “LE page” is but below my full code so far for both JS and HTML (with client IDs and secrets omitted)
const $input = $('#city');
const $submit = $('#button');
const $destination = $('#destination');
const $container = $('.container');
const $venueDivs = [$("#venue1"), $("#venue2"), $("#venue3"), $("#venue4")];
const $weatherDiv = $("#weather1");
const weekDays = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
// Add AJAX functions here:
const getVenues = async () => {
const city = $input.val()
const urlToFetch = `${url}?${city}&limit=10&client_id=${clientId}&client_secret=${clientSecret}&v=20201123`
try {
const response = await fetch(urlToFetch)
if (response.ok) {
const jsonResponse = await response.json()
const venues = jsonResponse.response.venues.map(venue => {
return venue.name
})
return venues
}
}
catch(error) {
console.log(error)
}
}
const getForecast = async () => {
const urlToFetch = `${weatherUrl}?&q=${$input.val()}&APPID=${openWeatherKey}`
try {
const response = await fetch(urlToFetch)
if(response.ok) {
const jsonResponse = await response.json()
return jsonResponse
}
}
catch(error) {
console.log(error)
}
}
// Render functions
const renderVenues = (venues) => {
$venueDivs.forEach(($venue, index) => {
const venue = venues[index];
const venueIcon = venue.categories[0].icon;
const venueImgSrc = `${venueIcon.prefix}bg_64${venueIcon.suffix}`;
let venueContent = createVenueHTML(venue.name, venue.location);
$venue.append(venueContent);
});
$destination.append(`<h2>${venues[0].location.city}</h2>`);
}
const renderForecast = (day) => {
// Add your code here:
let weatherContent = '';
$weatherDiv.append(weatherContent);
}
const executeSearch = () => {
$venueDivs.forEach(venue => venue.empty());
$weatherDiv.empty();
$destination.empty();
$container.css("visibility", "visible");
getVenues().then(venues => {
renderVenues(venues)
})
getForecast()
return false;
}
$submit.click(executeSearch)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Wanderlust</title>
<link rel="stylesheet" type="text/css" href="public/reset.css" />
<link rel="stylesheet" type="text/css" href="public/style.css" />
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro|Work+Sans" rel="stylesheet">
</head>
<body>
<header>
<img class="logo" src="https://content.codecademy.com/courses/intermediate-javascript-requests/wanderlust/logo.svg" alt="logo" />
</header>
<main>
<h1>Where do you want to land?</h1>
<form autocomplete="off">
<input type="text" id="city">
<button id="button" type="submit">Submit</button>
</form>
</main>
<div class="container">
<div id="destination">
</div>
<div class="sectiontitle">
<h2>CURRENT WEATHER</h2>
</div>
<section id="weather">
<div class="weather" id="weather1">
</div>
</section>
<div class="sectiontitle">
<h2>TOP ATTRACTIONS</h2>
</div>
<section id="venues">
<div class="venue" id="venue1">
</div>
<div class="venue" id="venue2">
</div>
<div class="venue" id="venue3">
</div>
</section>
<footer>
</footer>
</div>
<script
src="https://code.jquery.com/jquery-3.2.1.min.js"
integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="
crossorigin="anonymous"></script>
<script src="public/helpers.js"></script>
<script src="public/main.js"></script>
</body>
</html>