pop all except first js code example
Example: javascript remove all objects from array of objects except first
var input = ['a','b','c','d','e','f'];
input.length = 1;
console.log(input);
var input = ['a','b','c','d','e','f'];
input.length = 1;
console.log(input);