In JavaScript, ellipses (…) are used for two separate shorthands — rest syntax and spread syntax. Let's find out how they work...
#DEVCommunitydev.to/kai_wenzel/javascript…
💛 JavaScript tip 💛
indexOf uses strict equality comparison under the hood.
This means it can only ever find the exact reference but not an identical object.
'findIndex' fixes this because you can pass a callback you can use to identify an object. ↓