Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.7k
algorithm: reverse#1197
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
algorithm: reverse#1197
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
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.
Please...
- Name this
reverse
- Use a proper JSDoc comment
- Why is your comment screaming at me?
- Don't use a
const Array
in your tests (shadows the built-inArray
) - just inline the arrays - Consider using
each
here - Declare
temp
asconst
inside the loop
Just to be sure:
Sorry for these mistakes, I'm a beginner student that heard and is learning about the open-source software |
Not only the file names, also the function name.
Sorry, I should've made myself more clear. I did not mean "use for-each for reversing". I meant use Jest's |
Everything is done, I guess. |
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.
You forgot to rename the files...
Describe your change:
Algorithm to invert elements in an array:
[a,b,c,d] //output [d,c,b,a]
Checklist:
Example:
UserProfile.js
is allowed butuserprofile.js
,Userprofile.js
,user-Profile.js
,userProfile.js
are notFixes: #{$ISSUE_NO}
.