-
-
Notifications
You must be signed in to change notification settings - Fork 283
Glasgow Class 6 - Diana Savchuk - JS-1 - Week 3 #263
base: main
Are you sure you want to change the base?
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.
This is all really good work! All the tests pass, which is impressive. I did notice that one of the tests at the end had been changed slightly - do remember that tests shouldn't be changed, but actually it was just because of expressing numbers in two decimal places (which you had already done elsewhere), and you'd got looping through the array correct, which is the main thing here!
I'd advise you to look at array methods like .map()
and .filter()
, and see if you can think how you might be able to simplify some of this code using these methods and callback functions. They may be a little tricky to understand at first, but they do make writing functions like this quite a lot simpler once you are used to them so it's worth your time trying to use them!
Thanks a lot for feedback, Douglas. I will definitely try to implement .map() and .filter() methods in my code :) |
This is good work - you've used |
@@ -20,17 +20,17 @@ function sayHello() { | |||
} | |||
|
|||
let hello = sayHello(); | |||
console.log(hello); | |||
console.log(hello); //sayHello() function does not have a return statement | |||
|
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.
Nice One
No description provided.