Conversation
tekul
left a comment
There was a problem hiding this comment.
Great work Havva! 💯 . I posted a few suggestions and questions but they are mostly minor details, let me know what you think.
| isTouchScreen: false, | ||
| hasCamera: true, | ||
| batteryTime: "3 hours" | ||
| }; |
There was a problem hiding this comment.
Good 👍 . Can you think of a better way of storing the screen size? A single number isn't too useful.
There was a problem hiding this comment.
can I write screenSize = '10 inches'
There was a problem hiding this comment.
A screen has two dimensions, so I was thinking you could use a nested object, e.g.
screenSize: { width: 1024, height: 768 }
| var artist = { | ||
| name: "Picassso", | ||
| ageHeDied: 78, | ||
| painting: ["Guernica", "The Old Guitarist", "Bulls Head"] |
There was a problem hiding this comment.
👍 Maybe name this field paintings since it is a list rather than a single painting.
| name: "Pluto", | ||
| chemicalComposition: "Mixture of %70 Rock", | ||
| radius: 1150 | ||
| }; |
There was a problem hiding this comment.
I'm guessing you mean "planets" rather than "galaxies" 🙂 ? Also again the name should be singular (i.e. planet) rather than plural. If it was a list of objects rather than a single object a plural name would make sense.
|
|
||
| var kitten = { | ||
| name: "Gilbert" | ||
| }; |
|
|
||
| if (coffee == "flatWhite") { | ||
| if (this.insertedAmount >= this.prices.flatWhite) { | ||
| return "Please take your blackcoffee"; |
There was a problem hiding this comment.
"Expected result: 'Please take your flatWhite'. Actual result: Please take your blackcoffee" 🤔 .
Make sure you check the test output for each exercise.
There was a problem hiding this comment.
for this code I really try many way then I found the answer it was working but i didn't release I didn't change blackCoffee:(
There was a problem hiding this comment.
Yeah. It's just a cut and paste error :).
| return restaurants.filter(parameter => | ||
| parameter.address.area.includes(area) | ||
| ).length; | ||
|
|
There was a problem hiding this comment.
👍. Again, I would use restaurant instead of parameter.
| // # 3 | ||
| // prints [ 'head_intern', 'intern' ] | ||
| console.log(); | ||
| console.log(Object.keys(storeBranches.edinburgh.interns)); |
| friends: ["John", "Nina"] | ||
| friends: ["John", "Nina"], | ||
| makeFriend: function(name) { | ||
| this.friends[this.friends.length] = name; |
There was a problem hiding this comment.
This is a case when I would use push. Indexing past the end of the array is a bit of a weird Javascript thing and best avoided. My advice would be to avoid using array indexes in general if you can think of another way to do something.
|
|
h |
No description provided.