What is the difference between the two?
So I know that array.size() is a function while array.length is a property. Is there a usecase for
we can you use .length property to set or returns number of elements in an array. return value is a number
> set the length: let count = myArray.length;
> return lengthof an array : myArray.length
we can you .size in case we need to filter duplicate values and get the count of elements in a set.
const set = new set([1,1,2,1]); console.log(set.size) ;`