-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Added Sum of Digits Implementation #684
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
Conversation
This pull request introduces 1 alert when merging d402327 into f04dec3 - view on LGTM.com
new alerts:
- 1 for Useless assignment to local variable
Fixed the mistake
I intended to initially write a different implementation but I wrote something else 🤦♂️
What happened to the package-lock.json
?
Umm, I tried to install the Node Modules which were there for the project (you hadn't told me about Jest testing stuff on Discord yet) and I think the conflict might be because of that.
Also, I'll fix the 2 spaces problem, I thought setting tab space to 2 would suffice but looks like it didn't.
For the styling problem, you need to style the code with standard.js
.
Okay finally. Sorry I have nearly no experience with linters (I just have a eslintrc which use everywhere) so I kinda messed up...
standard.js
is easy to use with no configuration needed, so in my opinion it is the best for beginners, who are targeted by this repo.
I can't help but agree. But as a guy mostly used to ESLint and one who didn't try anything else, it was confusing.
Standard
is really good, I don't doubt that. It was mostly my not-being used to it was what kinda messed them up. However, now that I know how it works, I will probably be able to contribute properly next time.
(Also can we merge the PR now? Looks like everything's fine now~)
Could you remove the package-lock.json
changes?
Umm, actually I don't exactly know how I could undo that 😅
Could you please tell me how to do that? ( Sorry if that sounds really dumb 😰 )
Just run npm install
and then commit it again.
Umm, but the thing which caused the changes in the package-lock
was me running npm install
I still ran it again, and it generates the same Lockfile to the one I committed (by mistake).
Do you want me to copy the current package-lock
from this Repo and put it into mine? Because that's the only other alternative I can think of at the moment.
If npm install
keeps the file the same, leave it.
The related question: https://the-algorithms.com/algorithm/sum-of-digits
There's no JavaScript implementation, so I implemented in JS. Also, I might have messed up writing the tests, since it was not exactly clear to me. So I'd request to please crosscheck the tests(, and if I have any mistake/error in there, I'll fix it)