UPDATE indexof method using MDN style