ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、视频、阅读、搜索等,送10W Token,即刻开启你的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方法不是在原数组进行处理,而且要赋值给新变量**