js delete all from array

Solutions on MaxInterview for js delete all from array by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "js delete all from array"
Paula
06 Sep 2016
1var list = [1, 2, 3, 4];
2function empty() {
3    //empty your array
4    list.length = 0;
5}
6empty();
7