-
-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
a tiny js world #376
a tiny js world #376
Conversation
Hey! Congratulations on your PR! 😎😎😎 Let's do some self-checks to fix most common issues and to make some improvements to the code before reviewers put their hands on the code. Go through the requirements/most common mistakes listed/linked below and fix the code as appropriate. If you have any questions to requirements/common mistakes feel free asking them here or in Students' chat. When you genuinely believe you are done put a comment stating that you have completed self-checks and fixed code accordingly. Also, be aware, that if you would silently ignore this recommendation, a mentor can think that you are still working on fixes. And your PR will not be reviewed. 😒 A Tiny JS World -- (pre-OOP) exercise check listRelates to Object-Oriented JavaScript task. Check-list - definition of done
Universal recommendations:
Also take a note of the requirements above and follow them in all your future projects. By the way, you may proceed to the next task before this one is reviewed and merged. Sincerely yours, |
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.
Hey, nice work, let's improve it. Check the comments below.
|
||
const inhabitants = [dog, cat, woman, man, catWoman] | ||
|
||
const printInhabitants = (inhabitants) => Object.values(inhabitants).join('; ') |
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.
Doesn't this function receive 1 inhabitant?
|
||
const inhabitants = [dog, cat, woman, man, catWoman] | ||
|
||
const printInhabitants = (inhabitants) => Object.values(inhabitants).join('; ') |
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.
The task specifically states not to use methods like Object.values
and other similar ones.
gender: 'female', | ||
legs: 2, | ||
hands: 2, | ||
saying: cat.saying, |
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.
If we change cat.saying
, would catWoman.saying
change too? The task requires it to do so.
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.
honestly, I think yes, it would change)
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.
It won't since you're not creating any sort of connection here. You're just getting a value from cat.saying
and assigning it to saying
. It happens only once.
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.
Oh, sorry) I totally forget about getter and setter
@artem-trubin thanks for review) |
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.
That's one way of doing this, good job! You could've also used bind
method or connected them with prototyping.
A Tiny JS World
Demo |
Code base
The code is submitted in a dedicated feature branch.
Only code files are submitted.
Please, review.