Create a slider exercise using Javascript