5 kyu
Javascript Magic Function
505 of 539candrabeqx
Loading description...
Language Features
Functional Programming
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
Is this still solvable today?
Those anyone have solution
Why is
console.log
disabled??Until this changes, for other people's information,
console.info
still works.This comment has been hidden.
test.expect
is used in the sample tests"console.log is disabled"
...? :oNode 14.x
, updated sample tests, fixed description, did not dare touch thePreloaded
code ..@candrabeqx I have very much enjoyed this kata - it's definitely one of my personal favorites. Thank you. Bravo!
Hi! Are there any sources that i can refer to, because i am having some troubles solving this problem.
Thank You.
try "magic method" ;)
This comment has been hidden.
Hi, I can pass the basic test cases but when I try to submit this message is shown: Failed when calling the function 16 times: TypeError: b.apply is not a function That occurs for the multiple call tests.
What's the cause of that error message?
maybe your function do not return something that callable?
This comment has been hidden.
To return a function, you simply... return a function!! :)
For example:
This comment has been hidden.
Also I really want to upvote if it weren't for that
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
Hmm I cannot see your comments due to "spoiler" and I cannot figure out how to show them, but I figured out the solution, but I feel like it should be clarified still
Same here - would have upvoted if it weren't for that.
I think that "type casting" alone deserve a seperate Kata and should not be mixed with this Kata.
Anyway thanks for the Kata - the "can be called infinitely" part is quite challenging. :)
This comment has been hidden.
Hi! welcome to Codewars ;)
on the description, it is said that the function "can be called infinitely" means that the return of your function should be callable a.k.a returning another function.
hope this helps.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
Hi there,
since you don't reply to this discussion in a week and I have given the clue for your issue, I will mark this issue as resolved.
just wondering, why this kata has so low attention :(
c'mon warriors, solve this one, and make this out of beta!
this is fun kata anyway ;)
You've disabled
console.log
and there's no example cases on non-castable type inputs ~~, which makes this kata frustrating (impossible) to debug !!!pre-test case added,
console.log()
disabled. please let me know if you can do it in some other way.This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
I would say acceptable, but frowned upon. :-)
The only time I see a use for this is when it's unclear what the method really is to return. In this case, everyone with rudimentary skills in addition knows what the outcome should be.
As much as I understand your goal of making it a little bit trickier for the writer of the kata, the only effect is that everyone needs to soil their code with a bunch of
console.log
statements, printing the arguments and result.In this case, I vote for going back to
Test.assertEquals
.And in the case you mention, I think your comment is a bigger hint of what's wrong than
Expected 3 but got 12
.I've updated the test cases, thank you for both your feedback.
Please let me know if I missed something, or something I can improve there.
Thanks, that'll be much nicer for future warriors!
BTW, did you got a notification(s) everytime I edited my kata?
No, I just check the notifications in the upper-right when I log in, just like anyone else. :-)
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
Yup, added now. Sorry for the mistake, I was altering the test, but suddenly my connection lost.
Nice. Marked as ready by me.