javascript - 未捕获的 SyntaxError:标识符“源”已被声明
问题描述
const source = [1,2,3,4,5,6,7,8,9,10];
function removeFirstTwo(list) {
const [,, ...arr] = list; // Change this line
return arr;
}
const arr = removeFirstTwo(source);
/* In chrome developer tools this line is giving the error
I mentioned. but it's working on freecodecamp website. */
解决方案
推荐阅读
- swift - 无法检测到 SKSpritNode 的接触(Swift Xcode)
- oracle - 我需要与此选择等效的数据透视 sql
- ios - 如何在 ViewWillAppear 中为自定义 UITableViewCell 添加边框
- java - 如何不断更新整数
- docker - 量角器无法在 docker 容器中启动
- python - Python Google Cloud Firestore 错误 504 Deadline Exceeded
- php - PHP IMAP 电子邮件正文解码问题
- sql - 需要 oracle 查询以在一个字符串中显示数据
- python - PyQt5 QWebEnginePage - 可以编辑 HTML 以打开下拉列表吗?
- git - git apply patch 排除 2 个文件