在JS中也有和python一样的判断元素是否在数组或者对象内的关键字 in用法: let a = [1,2,3]console.log(2 in a) //打印true,因为in用来判断2是否是数组a的元素