How to implement the logic of the spin in slot machine?

Hi, at the moment I need to create a slot machine on JavaSript. And I don`t know how to implement the logic of the spin. Should I create the n-th amount of the items of the reels or should I add items that will display on the screen before spin started and then move them on the top of the reel and randomize them? If the second variant is correct, give me advice on how to do this.

Is up to yours requirements, just start to do any solution, you could change later.