В
Size: a a a
В
В
F
p
Ai
F
В
const searchCountries = (name: string) => {
const lowerName = name.toLowerCase()
// копия массива из полученных данных
const names = Array.from(Countries)
return name === '' ? names : names.filter(({Slug}) => Slug.includes(lowerName))
}
console.log(searchCountries('c'))
p
F
p
F
F
p
F
F
p
F
F
F