Closed vzvu3k6k closed 11 years ago
After executing Combinatorics.combination(array, num).next(), result leaks into global scope.
Combinatorics.combination(array, num).next()
result
var Combinatorics = require('./combinatorics.js').Combinatorics; console.log(Combinatorics.combination([ 1, 2, 3 ], 2).next()); // [ 1, 2 ] console.log(result); // [ 1, 2 ]
After executing
Combinatorics.combination(array, num).next()
,result
leaks into global scope.