Things to keep in mind for arrays in JS
We know that immutability is an important factor when working in React.
The thing with arrays in JS is that, they are reference values.
CODE:
const arr = [20, 1, 2, 100];
const getSortedArray = (array) => array.sort((a, b) => a - b);
console.log("ar...
sakshambhatt.hashnode.dev1 min read