How to remove first and last element in an array?
For example:
var fruits = [\"Banana\", \"Orange\", \"Apple\", \"Mango\"];
Expecte
This can be done with lodash _.tail and _.dropRight:
var fruits = ["Banana", "Orange", "Apple", "Mango"]; console.log(_.dropRight(_.tail(fruits)));