if newsIdsincludesthisNewsId 里的 includes是啥意思
includes是JavaScript数组的一个方法,用于判断数组中是否包含指定的元素。如果数组中包含指定的元素,该方法将返回true,否则返回false。在给定的代码中,newsIds是一个数组,thisNewsId是要检查的元素。因此,如果newsIds数组中包含thisNewsId,条件if (newsIds.includes(thisNewsId))将为true。
原文地址: https://www.cveoy.top/t/topic/jb9T 著作权归作者所有。请勿转载和采集!