什么是一个好的JavaScript技术/约定/标准要避免unused variables?
例如,如果我正在调用下面的函数并且我只想使用第3个参数,那么我该如何处理第1和第2个参数?
$.ajax({
success: function(first, second, third){
console.log("just using: " + third);
}
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1471 次 |
| 最近记录: |