This repository was archived by the owner on Oct 26, 2020. It is now read-only.
Open
Conversation
Ashaghel
reviewed
Jul 10, 2020
Ashaghel
left a comment
There was a problem hiding this comment.
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. | |||
|
|
|||
There was a problem hiding this comment.
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 :)
|
|
||
| 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 |
There was a problem hiding this comment.
this one is a bit tricky, search passing by value vs passing by reference
| // Use console.log() to output everything contained in your cart | ||
| console.log(this.myBasket); | ||
| } | ||
| } |
|
|
||
| // Add your code here | ||
| constructor(amount) { | ||
| this.amount = amount; |
There was a problem hiding this comment.
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"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Your Details
Your Name: Iman
Your City: Manchester
Your Slack Name: Iman-feisali
Homework Details
Module: JavaScript
Week: 9