Skip to content

Instantly share code, notes, and snippets.

@marianomike
Created October 2, 2016 22:29
Show Gist options
  • Save marianomike/a639d95c23e77782112a89e91abf2fbb to your computer and use it in GitHub Desktop.
Save marianomike/a639d95c23e77782112a89e91abf2fbb to your computer and use it in GitHub Desktop.
function checkIfExists(colorName, existingStyles){
var existsArray = [];
for (var i = 0; i < existingStyles.length; i++){
if(existingStyles[i] == colorName){
existsArray.push(colorName);
}
}
if(existsArray.length > 0){
return true;
}else{
return false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment