-2
else 조건 만 확인하고 싶습니다. 아래 코드를 단순화 할 수있는 방법이 있습니까?이 논리 문장의 반대는 무엇입니까
if (_endCurrentGoal && _startCurrentGoal && _startCurrentGoal === _startEffectiveDate && _endCurrentGoal === _endEffectiveDate) { //no statement);
}
else {
console.log("check for this code only");
}
아래 코드가 정확합니까? 그것을 단순화하는 방법이 있습니까?
if(!(_endCurrentGoal && _startCurrentGoal && _startCurrentGoal === _startEffectiveDate && _endCurrentGoal === _endEffectiveDate) {
console.log("check for this code only");
}
네, 맞습니다하지만 첫 번째 방법 –
을 선호하지만 if 문 첫 번째를 확인하기 위해 필요하지 않습니다과 같이 표시됩니다
. 그냥 else 문을 실행해야합니다. – noob
슬픈 사람들이 저의 질문에 대해 하찮게 생각합니다. 그것은 내가 그것을 해결하려고 애 쓰지 않는다는 것이 아니다. – noob