Closed charlielafosse closed 5 years ago
Oh and on another note... if you are going to use ES6, make sure you fully commit and don't slide between ES5 and ES6. Lines 53-54 in your script.js
:
const url = 'https://www.themealdb.com/api/json/v1/1/random.php';
var xhr = new XMLHttpRequest();
For best practices, try to agree as a group before you begin, if you're going to stick with ES5, or go all-out ES6.
Thanks for pointing it out. We get very nervous with const. I have resolved the issue now.
Sweet ES6 m'dudes :+1:
But just keep thinking about
let
andconst
... you uselet
quite a few times in yourscript.js
whenconst
would've done just fine. For exampleSure, you add an event listener to
a
on the next line, but you're not reassigninga
at all.A small point though!