The find() method in Javascript is used on arrays to find the first element in the array that meets a condition which you pass in through a function. In this video, we …
Tag: find in array javascript, [vid_tags]
Xem thêm: https://blogthủthuật.vn/category/pc
Nguồn: https://blogthủthuật.vn
Previous Post
How to use the FIND function in Excel
very helpful.. thanks dude
so how would you code if you wanted ALL dentist?
I just spent maybe 3 hours trying to do this as prescribed by my teacher, and still couldn't figure it out – teacher insists on callback functions with functions to find a match in an array, made no sense to me whatsoever, maybe 12 lines of code for the same result as this. Finally got it working in 30 seconds with this. Thanks.
what happens if we have occupation as an object again with two key value pairs…in such case..how do we use find???
const personas = [
{nombre: 'Dom', ocupacion: 'Desarrollador'},
{nombre: 'Eric', ocupacion: 'Dentista'},
{nombre: 'Kate', ocupacion: 'Peluquera'}
];
const people = [
{name: 'Dom', ocupation: 'Software developer'},
{name: 'Eric', ocupation: 'Dentist'},
{name: 'Kate', ocupation: 'Hair dresser'}
];
Thank you for a clear and concise explanation!
awesome content man, thanks!
please i dont understand why u passed in person as an argument when you run the code does person become people in the global function
Please don't stop uploading videos. Great work. Audio quality is also good. 🙂
thank you … but what if you have three objects with the occupation dentist and you want to find the name of the one in the middle ?
What kind of keyboard do you use? It sounds amazing lol
Awesome