Thursday, 15 August 2013

Condensing multiple if statements in JavaScript

Condensing multiple if statements in JavaScript

I have this:
if(currentSlide !== 3) {
$('#chapterBackground.intro').fadeOut(100);
}
if(currentSlide !== 4) {
$('#chapterBackground.intro').fadeOut(100);
}
...but how should I condense it into one if statement?

No comments:

Post a Comment