Skip to content
This repository was archived by the owner on Jan 14, 2024. It is now read-only.

Glasgow Class 6 - Malkit Benning - JavaScript Core 2 - Week 1 - #217

Open
malkitbenning wants to merge 5 commits into
CodeYourFuture:mainfrom
malkitbenning:main
Open

Glasgow Class 6 - Malkit Benning - JavaScript Core 2 - Week 1 #217
malkitbenning wants to merge 5 commits into
CodeYourFuture:mainfrom
malkitbenning:main

Conversation

@malkitbenning

Copy link
Copy Markdown

Your Details

  • Your Name: Malkit Benning
  • Your City: Glasgow
  • Your Slack Name: Malkit Benning

Homework Details

  • Module: JavaScript Core 2
  • Week: 1

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?

@msimmdev msimmdev left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work on the tests and the extra exercises. I've spotted a few issues to take a look at, but overall good solutions to the problems.

// write code here

let topPlayers = basketballTeam.topPlayers.sort();
topPlayers.forEach((player) => console.log(player));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 = {};

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue: Don't leave console.log lines in your solution if the exercise doesn't require them

Comment thread 3-extra/1-count-words.js
// write code here

let allWords = [];
if (!(string === "")) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestions: Use the !== operator for this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants