我有一个js代码...
在那我跑了js Lint ...
我有这个错误'currentApple'已经定义....
我需要从其他地方删除var currentApple吗?
在下面提供我的代码...
if(appleTab == Lifeline){
var currentApple = appleWorklist.getcurrentAppleTime("currentAppointmentcurrentAppleTime");
fo.allApples = currentApple;
}
else
{
var currentApple = appleWorklist.getcurrentAppleTime("CalendarcurrentAppointmentcurrentAppleTime");
fo.allApples = currentApple;
}
最佳答案
var currentApple;
if (appleTab == Lifeline) {
currentApple = /* etc. */