Created
July 29, 2014 21:04
-
-
Save thalesmello/d6f2083dd53a4b340613 to your computer and use it in GitHub Desktop.
google spreadsheets difference
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function difference(old_one, new_one){ | |
var difference = []; | |
new_one.forEach(function(new_el){ | |
var common = false; | |
old_one.forEach(function(old_el){ | |
if(old_el[0] === new_el[0]){ | |
common = true; | |
} | |
}); | |
if(!common){ | |
difference.push(new_el); | |
} | |
}); | |
Logger.log(difference); | |
return difference; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment