internet explorer - javascript findIndex issue with IE -


i've completed small form , found out how i'm using findindex doesn't work ie.

here example of issue.

var people = [   {name:"mike", age:"25"},   {name:"bill", age:"35"},   {name:"terry", age:"44"} ]; console.log(people.findindex(x => x.name=="bill" )); 

what fastest way fix issue ie?

find index support browsers

    chrome 45.0 , above: supports      firefox 25.0 , above: supports      internet explorer: no support      microsoft edge: supports      opera: supports      safari 7.1 , above: supports 

so need modify code similar below work in browsers.

var index; for(var i=0;i<people.length;i++){   if(people[i].name == 'billi'){    index =  } } 

more info


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -