The {delay: 1000} part is the delay in milliseconds between items if you click Play. Let me know if you don’t want the Play/Pause button — you could definitely do something similar but simpler without that.
Edit: One limitation of this approach is that 1891 and 1893 would appear adjacent on the slider, same as 1890 and 1891; there’s no indication that a year was skipped. One can imagine a slider with proportional “notches” on every valid possible value, linearly positioned like tick marks on a timeline, that would only let you drag to those notches. That’s doable too, but it would have to be totally custom — I don’t think you could do it with a native HTML <input type="range"> slider (which Mike’s Scrubber and the other official inputs use). Or maybe you could hack it, if you listened for the end of the drag and then programmatically set its value to the nearest valid notch.
Setting form.value = “1902”, which worked great! This happens to be the last year in the array. If I use “1836” , the first year in the array, the value of year2display comes out correct but the slider is in the incorrect position. No matter what value I set form.value to, the slider is full right?
I’m assuming this is pilot error, but I can’t see any other way of setting a selected value so the slider is in the corresponding position.