I want to check if an array contains \"role\". If it does, I want to move the \"role\" to the front of the array.
\"role\"
var data= [\"ema
let data = [0, 1, 2, 3, 4, 5]; let index = 3; data.unshift(data.splice(index, 1)[0]); // data = [3, 0, 1, 2, 4, 5]