mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-03 09:49:20 +02:00
13 lines
205 B
TypeScript
13 lines
205 B
TypeScript
function findCommonElement <T> (array1: T[], array2: T[]) {
|
|
for (const a of array1) {
|
|
for (const b of array2) {
|
|
if (a === b) return a
|
|
}
|
|
}
|
|
|
|
return null
|
|
}
|
|
|
|
export {
|
|
findCommonElement
|
|
}
|