S
S
string152018-02-12 16:24:35
JavaScript
string15, 2018-02-12 16:24:35

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 alertof replacing with console.logit no longer works!
I suspect the reason is in the methodtoString

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anatoly Zharov, 2018-02-12
@string15

toString should return a string, in the example a number
f.toString = () => currentSum + '';

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question