Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function add(num) {
- let sum = num;
- function calc(num2) {
- sum += num2;
- return calc;
- }
- calc.toString = function() { return sum };
- return calc;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement