• Jobs
  • About Us
  • Jobs
    • Home
    • Jobs
    • Courses and challenges
  • Businesses
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

203
Views
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.

over 3 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Show me some job opportunities
There's an error!