Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

231
Visualizações
Where does this second function gets the data from?

I'm learning the basics of java for a few weeks and it's all fun! Did many micro-apps with it and overall, having a good time.

But while I was writing some code for my course, i was stuck at one part.

The app is about search bars using functions and arrays

  const Characters = [{name: 'Mickey Mouse', age: 93},{name: 'Winnie The Pooh', age: 96},{name: 'Donald Duck', age: 86},{name: 'Scrooge McDuck', age: 75}]

const searcbar = function(Charac, name){
    const searchalt = Charac.find(function(Naame, index){
        return Naame.name.toLowerCase() === name.toLowerCase()
    })
    return  searchalt
}

let data = searcbar(Characters, 'winnie the pooh')
console.log(data);

I nearly understood how the whole code works other than this part:

const searchalt = Charac.find(function(Naame, index){
            return Naame.name.toLowerCase() === name.toLowerCase()

Where does this function get its data from? Like I didn't give it any value, I cant understand where does it get from.

Thank you.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda