let us consider an array
let array=["a","b","c","d","a"]
a is already present in the array, how to return true/false for this condition. i don't want to do this
let value=array.includes("a")
in this case i know a is repeated so i use includes("a"). How to write a generic solution to find if an item is repeated in an array .(imagine getting an array from an api, so u wont know what will be repeated )