I assign the new variable to an array. after modifying the array the assigned variable follows the changes of array unexpectedly!
let reference = "I was sent* to Earth,* to protect you."
let orders = reference.split("*").map(s => s.toLowerCase().replace(/\,|\?|\!|\:|\./g,'').trim());
let answer = orders;
console.log(orders)
console.log(answer)
// changing orders and not answer!
orders.push(orders.shift());
// the orders changes as expected but the answer (that is not changed before follows the orders changes)
console.log(orders)
console.log(answer)