DEV Community

Discussion on: Image Slider with JavaScript

Collapse
 
mathiasdahl profile image
mathiasdahl

For my own learning, is there a reason why you sometime use a normal function definition and sometime define a constant using an anonymous function? For example prevSlide.

Collapse
 
j471n profile image
Jatin Sharma

No, there is no reason at all. You can use either function definition or the const one.