我有一些js代码;在那里我运行了 js lint。我有这个错误:
'currentApple' 已经定义
我是否需要删除 varcurrentApple
才能else
使其工作?
我在下面提供我的代码:
if(appleTab == Lifeline){
var currentApple = appleWorklist.getcurrentAppleTime("currentAppointmentcurrentAppleTime");
fo.allApples = currentApple;
}
else
{
var currentApple = appleWorklist.getcurrentAppleTime("CalendarcurrentAppointmentcurrentAppleTime");
fo.allApples = currentApple;
}