cscg24-guacamole

CSCG 2024 Challenge 'Guacamole Mashup'
git clone https://git.sinitax.com/sinitax/cscg24-guacamole
Log | Files | Refs | sfeed.txt

index-of.js (342B)


      1var indexOf;
      2
      3if (Array.prototype.indexOf) {
      4    indexOf = Array.prototype.indexOf;
      5} else {
      6    indexOf = function (o) {
      7        // I know
      8        var i;
      9        for (i = 0; i < this.length; ++i) {
     10            if (this[i] === o) {
     11                return i;
     12            }
     13        }
     14        return -1;
     15    };
     16}
     17
     18export { indexOf as default };