Glasgow Class 6 - Malkit Benning - JavaScript Core 2 - Week 1 - #217
Glasgow Class 6 - Malkit Benning - JavaScript Core 2 - Week 1 #217malkitbenning wants to merge 5 commits into
Conversation
| // write code here | ||
|
|
||
| let topPlayers = basketballTeam.topPlayers.sort(); | ||
| topPlayers.forEach((player) => console.log(player)); |
There was a problem hiding this comment.
Nitpick: This would be slightly cleaner by omitting the parenthesis around player
topPlayers.forEach(player => console.log(player));This is possible as the arrow function takes a single paramter
| }; | ||
|
|
||
| sayHelloToUser(user); | ||
| //you are calling a function that does not 'return' a value |
There was a problem hiding this comment.
Issue: The fact that the function doesn't return a value here doesn't matter. It will still run and the function includes a console.log so it will output to the console. Take another look and see if you can spot why the log will include an undefined value.
|
|
||
| function createLookup(countryCurrencyCodes) { | ||
| // write code here | ||
| currencyObj = {}; |
There was a problem hiding this comment.
Issue: You must use let or const to declare a new variable
| let shoppingList = {}; | ||
| let recipeName = recipe.name; | ||
| let missingIngredients = []; | ||
| console.log("recipe name ", recipeName); |
There was a problem hiding this comment.
Issue: Don't leave console.log lines in your solution if the exercise doesn't require them
| // write code here | ||
|
|
||
| let allWords = []; | ||
| if (!(string === "")) { |
There was a problem hiding this comment.
Suggestions: Use the !== operator for this.
Your Details
Homework Details
Notes
What did you find easy? Adding some of the new tests
What did you find hard? - The Extra Exercise
What do you still not understand? - all good
Any other notes?