a) Is there any difference between the methods bellow (performance wise)?
b) Does this (.find) function iterates over all objects in the array?
c) Is there yet another syntax for this function?
#1 console.log(cres.find(o => o.name === refname));
#2 console.log(cres.find(function(o){return o.name===refname;}));
I'm looking for the most efficient way to find an object by it's property value in a large array. So, implementing a custom function (I.e:BTREE) would be a better approach?
Thx
UPDATE: Besides the "down vote". I've learned that the case in #1 is just a fancy notation for functions (Es6). So basically both cases are the same.
Anyways, It does not explains if the .find function iterates over all objects in the array and if that's the case a custom implementation would be more performatic...