Dassault Systèmes Interview Question

2)How to clear an array by different way

Interview Answers

Anonymous

Aug 24, 2018

A = []; orelse; A .length=0; orelse; loop it till length is 0 and pop all elements

3

Anonymous

Sep 26, 2021

arr.splice(0, arr.length)