-
Notifications
You must be signed in to change notification settings - Fork 44
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
base: main
Are you sure you want to change the base?
homework #262
Conversation
@@ -0,0 +1,14 @@ | |||
function height(tree) { |
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 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.
tree
is also not a valid name for the tree height argument. It would be sound better if you name itheight
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.
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('')); |
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.
-
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 aresultArray
; -
ofArray
is a bad name for an array row. By the way,row
will sound better ;) -
of
? What does it mean? If we image this array as a table, we haverows
,columns
, andcells
. So the best name for it would becell
. Please, rename it
No description provided.