function contains(list, elem) {
    return list.indexOf(elem) !== -1;
}

module.exports = {
    contains: contains
}

function fastContains(list, elem) {
    return list.indexOf(elem) !== -1;
}

function slowContains(list, elem) {
    for (var i = 0; i < list.length; i++) {
        if (list[i] === elem) {
            return true;
        }
    }
    return false;
}

var contains = Array.prototype.indexOf ? fastContains : slowContains;

module.exports = {
    contains: contains
}

Make contains() actually work in IE8
Make contains() actually work in IE8

Summary: IE8 doesn't have indexOf on arrays!

Reviewers: emily

Reviewed By: emily

Differential Revision: http://phabricator.khanacademy.org/D3052
