Say for example I have an array :
[ "car", "fish", "javascript", "Star Wars" ]
And I want to select the first three in this array, but not "Star Wars"
.
Can I do that by using brackets somehow? Like in Rails I could this by :
array[0..2]
Is there something similar in javascript?