i hope my question isn't that dumb. But i've wondered how arrays actually work in javascript. Espacially getting an element by index.
Let's assume i have an array called myFirstArray with the elements [1,2,3,4]. When i type myFirstArray[3], how does it work to get the fourth element from that array? Does it loop through? So everytime i want the last element of an array it is looping through the whole array?
Same goes with adding an element to an Array. Do it loop always through the array do find the last element in the Array?
I'm asking because i implemented a linkedList into Javascript and im wondering if it is more efficient than an normal array.