使用 JavaScript 实现类似于 Array.prototype.includes() 方法的自定义函数