Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

91
Views
javascript multiple parentheses function call

I'm trying to solve some javascript puzzle. I have some function (for example a function which calculates summa). But there is a weird calling of that function. example:

sum(5)

or sum(5,6) - should be 11

or sum(5)(6) - should be 11

or sum(1)(2)(3) - should be 6

Have never seen such function calling sum(1)(2)(3)(4).... Can you please explain or maybe put into documentation where this stuff is explained?

Thanks a lot.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

If the sum function returns a value that it can reuse, you can chain the numbers on and on.

If you can share the function it can be easier to explain

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!