I think that's elegant. You have one paradigm. You can conceptualize a JavaScript object as an array or as a dictionary or as a list, and you can just use one set of common syntax to manipulate any kind of object. Why waste time learning three different kinds of syntax to manipulate what is fundamentally the same kind of thing to the computer? If you need the performance of actually using a different kind of data structure, JavaScript probably isn't the tool you need for the job you are trying to do.
Initial thought when first seeing this was "DA F*** does he destructure 'length' for?" But yeah, ARRAYS ARE OBJECTS - so {length} will of course refer to the Array.prototype.length property 😅
"[They] were so preoccupied with whether or not they could that they didn't stop to think if they should."
I think that's elegant. You have one paradigm. You can conceptualize a JavaScript object as an array or as a dictionary or as a list, and you can just use one set of common syntax to manipulate any kind of object. Why waste time learning three different kinds of syntax to manipulate what is fundamentally the same kind of thing to the computer? If you need the performance of actually using a different kind of data structure, JavaScript probably isn't the tool you need for the job you are trying to do.
definitely gonna use the last one.. finding the middle of an array.
Please keep uploading my aWESome man
That's the plan!
Nice!
i love it
On the one-hand, *cool*.
On the other - This would be a nightmare to read and make sense of X-P
Sorcery! 🙂
Wow 😳😳
Initial thought when first seeing this was "DA F*** does he destructure 'length' for?"
But yeah, ARRAYS ARE OBJECTS - so {length} will of course refer to the Array.prototype.length property 😅
pretty neat eh
Confused
you're out of control
First view haha
People, please don't do this. Do it the right, more readable way
Don’t array shame me