📌  相关文章
📜  从 javascript 数组映射中删除未定义 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:58.242000             🧑  作者: Mango

代码示例1
var data = [42, 21, undefined, 50, 40, undefined, 9];

data = data.filter(function( element ) {
   return element !== undefined;
});