josex2r/jQuery-SlotMachine

Remove selected value from existing array

Closed this issue · 2 comments

I'm using the same array to create multiple machines.

How can I achieve the following?
Machine 1 = [1,2,3] (Result is 3, remove it)
Machine 2 = [1,2] (Result is 2, remove it)
Machine 3 = [1]

Right now machine.active gives me the selected index but I have no way to associate this number to my existing array.

why not?

If you have the index and the array you can get the selected element.

@josex2r thanks jose, I ended up doing just that.