Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
The one from w3schools is for MySQL, you use PostgreSQL here. Look at PostgreSQL docs and you'll find it there.
For this case it won't make a difference since we do not have any block within the function.
thanks for this!
Thank you, I love these breaking-down-code comments under the best solutions !
Because nonzero is truthy and zero is falsy, so you could just use the number itself as the condition.
Hello! Could someone explain why you don't need to type out "=== 0"?
I think so!
Thanks!
1: Rank cannot be changed.
2: I don't find the description unclear. The only problem is that the math equation should be formatted properly.
3: Simple tests are too easy to bypass, large tests make sure that only proper solutions do.
4: Do not reveal how to solve the problem in comments
While it's nice that you want to help your fellow warriors, it's not good practice to spell out the entire solution for them. We understand the feeling of pride at having solved a problem, and wanting to share your hard gained insights with others, but this just takes away other user's feeling of accomplishment at having arrived at the solution on their own. I have marked your post as a spoiler to hide it from others.
Thx !
Non-zero numerical values are "truthy" in JS and 0 s "falsy":
https://developer.mozilla.org/en-US/docs/Glossary/Truthy
Can you explain why you don't need '=== 0' in your if statement ?
does '%' return a boolean in addition to the remainder ?
Please don't post kata solutions in public places like codepen or github it's against the Codewars Code of Conduct: https://github.com/Codewars/codewars.com/wiki/Community-Code-of-Conduct