<commit_before>
// given a base and exponent, calculate the power via recursion

var base = process.argv[2];
var exponent = process.argv[3];

// recursion here...
<commit_msg>add power solution for nodejs<commit_after>
// given a base and exponent, calculate the power via recursion

var base = parseFloat(process.argv[2]);
var exponent = parseFloat(process.argv[3]);

var power = function(base, exp) {
    if(exp === 0) {
        return 1;
    } else {
        return base * power(base, exp - 1);
    }
};

var result = power(base, exponent);

console.log(result);


{'fraction_non_alphanumeric': 0.12874779541446207, 'fraction_numerical': 0.012345679012345678, 'mean_word_length': 3.4375, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '3255029', 'n_tokens_mistral': 179, 'n_tokens_neox': 171, 'n_words': 59}