A
A
Alexey Mairin2018-03-04 20:59:57
JavaScript
Alexey Mairin, 2018-03-04 20:59:57

How to call a function twice?

Hello!
Something got confused, what is the problem
when calling a function like obj.add() everything works
When I call obj.add().add() does not work
What could be the reason?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey, 2018-03-04
@m_avrina

obj.add().add() - the second add is called on the one returned by add.
return this;
how the add method final should help.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question