remove first element from array and return the array minus the first element

后端 未结 5 1380
温柔的废话
温柔的废话 2021-01-31 01:09



        
5条回答
  •  借酒劲吻你
    2021-01-31 01:32

    This can be done in one line with lodash _.tail:

    var arr = ["item 1", "item 2", "item 3", "item 4"];
    console.log(_.tail(arr));

提交回复
热议问题