Skip to content

Instantly share code, notes, and snippets.

@epitron
Last active August 11, 2016 09:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save epitron/538347943ae63afc598c2683d1da3adb to your computer and use it in GitHub Desktop.
Save epitron/538347943ae63afc598c2683d1da3adb to your computer and use it in GitHub Desktop.
var C = require('js-combinatorics');
var values = [true, false, 1, 0, -1, "true", "false", "1", "0", "-1", "", null, undefined, Infinity, -Infinity, [], {}, [[]], [0], [1], NaN]
C.permutation(values, 3).forEach(function(a) {
if (a[0] && a[0] == a[1] && a[1] == a[2] && a[0] != a[2])
console.log(a)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment