Skip to content
This repository has been archived by the owner on Oct 26, 2020. It is now read-only.

Iman week 9 #1023

Open
wants to merge 1 commit into
base: manchester3
Choose a base branch
from

Conversation

Iman-feisali
Copy link

Your Details

Your Name: Iman
Your City: Manchester
Your Slack Name: Iman-feisali

Homework Details

Module: JavaScript
Week: 9

@Ashaghel Ashaghel changed the base branch from master to manchester3 July 10, 2020 22:11
Copy link

@Ashaghel Ashaghel left a comment

Choose a reason for hiding this comment

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

Good work Iman
Except for the small bugs, all good !

@@ -15,6 +15,10 @@ Take a look at the following code:

Explain why line 4 and line 6 output different numbers.

Choose a reason for hiding this comment

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

I changed the PR to be against Manchester3 branch instead of master, ensure to check this as it may cause problems if people started adding comments :)

@@ -61,3 +68,5 @@ console.log(y);
```

What will be the output of this code. Explain your answer in 50 words or less.
first console.log output is 9,
second console.log is an object: x: 9

Choose a reason for hiding this comment

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

this one is a bit tricky, search passing by value vs passing by reference

cartContains() {
// Use console.log() to output everything contained in your cart
console.log(this.myBasket);
}
}

Choose a reason for hiding this comment

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

perfect


// Add your code here
constructor(amount) {
this.amount = amount;

Choose a reason for hiding this comment

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

there is a small issue here, your constructure require an argument, but when you created an instance of the class in line 19 you didn't pass it.
The question will be, do you need the other variable ? amount ?

//Add some songs to your playlist
myMusicPlayer.add("Bohemian Rhapsody", "Queen");
myMusicPlayer.add("Yesterday", "The Beatles");
myMusicPlayer.add("Vogue", "Madonna");

Choose a reason for hiding this comment

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

Excellent work!

@Ashaghel Ashaghel added the reviewed A mentor has reviewed this PR label Jul 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
reviewed A mentor has reviewed this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants