JSFiddle - React, Tailwind, and code Playground
JavaScript
var A = ["test"];
var B = ["hello", "world"];
var C = A;
A.splice(0);
A.push.apply(A, B);
console.log(C);
var A = ["test"];
var B = ["hello", "world"];
var C = A;
A.splice(0);
A.push.apply(A, B);
console.log(C);