| 赞 | 36 |
| VIP | 0 |
| 好人卡 | 0 |
| 积分 | 96 |
| 经验 | 0 |
| 最后登录 | 2025-10-26 |
| 在线时间 | 462 小时 |
Lv4.逐梦者
- 梦石
- 2
- 星屑
- 7633
- 在线时间
- 462 小时
- 注册时间
- 2021-12-4
- 帖子
- 492

|
/**
* Checks whether the array contains a given element.
*
* @method Array.prototype.contains
* @param {Any} element The element to search for
* @return {Boolean} True if the array contains a given element
*/
contains : {
enumerable: false,
value: function(element) {
return this.indexOf(element) >= 0;
}
}
contains是官方自己写的方法,建议还是用浏览器自带的includes更好,
[1, 2, 3, 4, 35, 36, 37].includes($gameVariables.value(1)) |
|