I have a a position and an array of users
const position = 2
const users = ["John", "Mary", "Daniel", "Michael"]
I want to generate a new array (or reorder it) starting from the position.
In the case of position = 2 the generated array should be
users = ["Daniel", "Michael", "John", "Mary"]
In the case of position = 3 the generated array should be
users = ["Michael", "John", "Mary", "Daniel"]
In the case of position 0 (no changes) the generated array should left intact
const users = ["John", "Mary", "Daniel", "Michael"]
how can I achieve this?