Skip to content
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

homework #262

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

homework #262

wants to merge 6 commits into from

Conversation

Baksckua
Copy link

No description provided.

@Baksckua Baksckua marked this pull request as ready for review December 27, 2022 07:04
@DrSmile444 DrSmile444 self-requested a review January 11, 2023 18:58
@@ -0,0 +1,14 @@
function height(tree) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. The function name should have a verb. For example, updateUser, fetchEntity, findLowestNumber, showTicket, displayName.

height is a bad name for a function, because it doesn't describe what the function does and there is no verb in the name. Please, find a new one.

  1. tree is also not a valid name for the tree height argument. It would be sound better if you name it height

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

[8, 6, 8, 6, 6, 7, 7, 6, 6, 7, 8, 7, 6, 6, 6, 6, 7, 8, 7],
];

const arr = array.map((ofArray) => ofArray.map((of) => (of > 4 ? '$' : '*')).join(''));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. arr is a bad name for the changed array. Could you let me know what you did here? You have remapped the array to have a new array. So let's rename it to a resultArray;

  2. ofArray is a bad name for an array row. By the way, row will sound better ;)

  3. of? What does it mean? If we image this array as a table, we have rows, columns, and cells. So the best name for it would be cell. Please, rename it

@DrSmile444 DrSmile444 self-assigned this Jan 11, 2023
Andrey Makarenko added 2 commits January 12, 2023 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants