我需要检查主数组中是否存在特定值.
var hideFilters = function() {
var listCategoryId = ['1000014', '1000015', '1000016', '1000017', '1000018', '1000019', '1000021', '1000086'];
var actualCategoryId = '1000018';
if (actualCategoryId === listCategoryId) {
console.log('is equal');
} else {
console.log('fuen... fuen...');
}
};
hideFilters();
Run Code Online (Sandbox Code Playgroud) 我正在尝试使用 api 中的数据,但是当我尝试渲染数据时,出现以下错误:
\n\n\n\n\n警告:遇到两个孩子使用同一把钥匙,
\n[object Object]。密钥应该是唯一的,以便组件在更新时保持其身份。非唯一的键可能会导致子项重复和/或省略 \xe2\x80\x94 该行为不受支持,并且可能在未来版本中更改。
这是CodeSandbox中的一个原型...可能这是一个简单的事情来解决,但我几天前开始研究react。你能帮助我吗?
\n