What does the += ???
function plusSlides(n) {
showSlides(slideIndex += n);
}
What does the += ???
function plusSlides(n) {
showSlides(slideIndex += n);
}
Hi,
+=
is a shorthand assignment operator.
In your example, slideIndex += n
is the shorthand form for slideIndex = slideIndex + n
Refer to this link for more info: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Assignment_Operators