A few years ago it was bad practice to do
array = [];
because if the array was referenced somewhere that reference wasn't updated or something like that.
The correct way was supposed to be array.length = 0;
Anyway, JavaScript has been updated now, and there's a framework called Vue.js
Vue does not catch array.length = 0;
so the property won't be reactive. But it does catch array = [];
Can we use array = [];
now, or is JavaScript still broken?