6 kyu

sum function

Description:

Write a sum function which will work properly when invoked using either syntax below.

sum(2,3);  // Outputs 5
sum(2)(3); // Outputs 5

HINT : use closures

Fundamentals

More By Author:

Check out these other kata created by skibinska

Stats:

CreatedAug 10, 2016
PublishedAug 10, 2016
Warriors Trained1000
Total Skips34
Total Code Submissions2302
Total Times Completed605
JavaScript Completions605
Total Stars18
% of votes with a positive feedback rating90% of 136
Total "Very Satisfied" Votes112
Total "Somewhat Satisfied" Votes20
Total "Not Satisfied" Votes4
Total Rank Assessments13
Average Assessed Rank
6 kyu
Highest Assessed Rank
5 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • skibinska Avatar
  • smile67 Avatar
Ad