Out of curiosity, is there any way to display inverted array index. Let's say we got this as our array:
var color = ["red", "green", "blue", "yellow"];
console.log(color[2]);
Of course the console will show "blue" right?
What if I want to display other than "blue"? That mean "red", "green", "yellow". Or should we use slice instead?
Thank you
["red", "green", "blue", "yellow"].filter((c,i) => i !== 2)