Skip to content

Instantly share code, notes, and snippets.

@DavidMellul
Last active March 10, 2018 13:57
Show Gist options
  • Save DavidMellul/08c4b1fa1c1559945f37f494263c6f84 to your computer and use it in GitHub Desktop.
Save DavidMellul/08c4b1fa1c1559945f37f494263c6f84 to your computer and use it in GitHub Desktop.
var OPTIONS = {
'GRAYSCALE': 1, 'SEPIA': 2, 'HIGH-RES': 3, 'LOW-RES': 4
};
function setCameraSettings(options) {
if(options.includes(OPTIONS['GRAYSCALE']))
console.log('GRAYSCALE activated');
if(options.includes(OPTIONS['SEPIA']))
console.log('SEPIA activated');
// And so on
}
setCameraSettings( [ OPTIONS['GRAYSCALE'], OPTIONS['SEPIA']] );
// => GRAYSCALE & SEPIA activated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment