JSFiddle - React, Tailwind, and code Playground
JavaScript
const a = [1];
const b = a.push(2);
/* const c = a.concat(2); */
console.log(b);
/* console.log(a); */
const a = [1];
const b = a.push(2);
/* const c = a.concat(2); */
console.log(b);
/* console.log(a); */