const arr: string[] = ['javascript', 'typescript', 'nodejs', 'php'];
const str = 'PHP-PHP';
const found = arr.find((element) => {
return element.toLowerCase() === str.toLowerCase();
});
console.log(found);
if (found == undefined) {
console.log('value is not in array');
} else {
console.log('value is in array');
}
/*
run:
undefined
"value is not in array"
*/