var myArray = [
		{
			hello: 'leon',
			foo: 'baz'
		},
		{
			hello: 'stevie',
			foo: 'zoo'
		}
	]

var index1 = myArray.map(x =>x.hello).indexOf('stevie');
var index2 = myArray.findIndex(x => x.hello === 'stevie');

document.write('使用indexOf.map()索引值為:'+index1+'<br/>');
document.write('使用findIndex()索引值為:'+index2);

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.