企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# Array.prototype.filter() ``` const words = ['spray', 'limit', 'elite', 'exuberant', 'destruction', 'present']; const **result = **words.filter(word => word.length > 6); console.log(result); // expected output: Array ["exuberant", "destruction", "present"] ``` **filter方法不是在原数组进行处理,而且要赋值给新变量**