https://tutorial.eyehunts.com/js/javascript-inarray-check-example-code/
JavaScript inarray check | Example code