Javascript Get Duplicated Values From An Array By Checking With Two

Javascript Get Duplicated Values From An Array By Checking With Two