Hello all javascript gurus!
here is one i have a problem with:
i have a string with comma separated elements. Dynamic number of elements. Never know how many there are could be.
i need: compare them. make sure that none of them is equal to another one.
example: string (2,1,1,0)
there are 2 elements that are equal, i need to send a message to user ('sorry can't have equal elements')
example: string (2,1,3,0)
none of the elements are equal, i need to send a message to user ('perfect')
i think it should be recursive, but have no idea how to implement this. please help!!!
here is one i have a problem with:
i have a string with comma separated elements. Dynamic number of elements. Never know how many there are could be.
i need: compare them. make sure that none of them is equal to another one.
example: string (2,1,1,0)
there are 2 elements that are equal, i need to send a message to user ('sorry can't have equal elements')
example: string (2,1,3,0)
none of the elements are equal, i need to send a message to user ('perfect')
i think it should be recursive, but have no idea how to implement this. please help!!!