<commit_before>> 实现如下语法的功能：var a = add(2)(3)(4); //9
[参考1](http://www.css88.com/archives/5147/comment-page-1)

[参考2](https://segmentfault.com/q/1010000004499011/a-1020000004499173)
方法一:
```
var add = function(a){
    return function(b){
        return function(c){
            return a+b+c;
        };
    };
};
 
add(1)(2)(3); //6
```<commit_msg>Update 2017-06-01-js的一点小菜.md<commit_after>> 实现如下语法的功能：var a = add(2)(3)(4); //9

[参考1](http://www.css88.com/archives/5147/comment-page-1)

[参考2](https://segmentfault.com/q/1010000004499011/a-1020000004499173)

方法一:
```
var add = function(a){
    return function(b){
        return function(c){
            return a+b+c;
        };
    };
};
 
add(1)(2)(3); //6
```
{'fraction_non_alphanumeric': 0.21940928270042195, 'fraction_numerical': 0.1490857946554149, 'mean_word_length': 3.0454545454545454, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4538993', 'n_tokens_mistral': 379, 'n_tokens_neox': 318, 'n_words': 39}