We can't use `forEach' and `some`, as we support IE8 and IE8 does not have them.