Skip to content

Instantly share code, notes, and snippets.

@heanfig
Created November 2, 2020 23:21
Show Gist options
  • Save heanfig/b47171cf8ed4d9ce7c27f1088d3d9d13 to your computer and use it in GitHub Desktop.
Save heanfig/b47171cf8ed4d9ce7c27f1088d3d9d13 to your computer and use it in GitHub Desktop.
symetric differnce
function sym(...args) {
return args.reduce( (a,b,i) => {
console.log('compara',a,'con',b);
// Ciclo 1 => Compara [] con [3, 3, 3, 2, 5],
// Ciclo 2 => Compara [] con [2, 1, 5, 7],
// Ciclo 3 => Compara [] con [3, 4, 6, 6],
return [];
},[]);
}
console.log(sym([3, 3, 3, 2, 5], [2, 1, 5, 7], [3, 4, 6, 6]));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment