-
-
Notifications
You must be signed in to change notification settings - Fork 458
Nawal week 9 #1024
base: manchester3
Are you sure you want to change the base?
Nawal week 9 #1024
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good job!
let y = 20 | ||
} | ||
|
||
console.log(f1()) | ||
console.log(y) | ||
console.log(f1()) //undefined - no parameter inside. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work, the issue is there is no return
console.log(y); | ||
``` | ||
console.log(y); // x : 10 y is an object and returning its value pair | ||
// ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good answer, double check passing by value vs by reference
cartContains() { | ||
// Use console.log() to output everything contained in your cart | ||
console.log(this.currentTotal); | ||
|
||
return this.currentTotal; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job!
myCart.addItem("Toilet Roll"); | ||
myCart.addItem("Pasta"); | ||
myCart.addItem("Eggs"); | ||
console.log(myCart.cartContains()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't need to console log the method, it has console log inside, you just need to call it
} | ||
|
||
greeting() { | ||
console.log('Hi! I\'m ' + this.personName + '.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
classy and to the point
return this.accountBalance | ||
} | ||
make_withdrawl(withdraw) { | ||
this.withdraw = withdraw; |
There was a problem hiding this comment.
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, the idea is to have a balance and remove from it and add to it, no need to each return !
} | ||
} | ||
// shuffle () { | ||
// let randomSong = playList.length, temporaryValue, this.counterIndex; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're so close 🥇
// console.log("there is no songs to play"); | ||
this.counterIndex = this.playList.length-1; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job!
Your Details
Your Name: Nawal
Your City: North West
Your Slack Name: nawalC
Homework Details
Module: js3
Week: 3