Answer the question
In order to leave comments, you need to log in
Has the problem been solved correctly?
Hey! Cantor has a problem The sum of an arbitrary number of brackets , I modified it to work with an unknown number of arguments. Example Is it ok? And it is still not clear why if instead alert
of replacing with console.log
it no longer works!
I suspect the reason is in the methodtoString
Answer the question
In order to leave comments, you need to log in
toString should return a string, in the example a numberf.toString = () => currentSum + '';
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question