Array clear code example
Example 1: c# clear an array
using System;
Array.Clear(arrayToClear, 0, arrayToClear.Length);
Example 2: javascript clear array
let aray = [1,2,3,4,5,6,7,8,9,10];
array = [];
array.length = 0;
array.splice(0, array.length);
array.map( () => array.pop());
array.map( () => array.shift());
Example 3: javascript array clear
var cars = ["mazda","honda","tesla"];
cars = [];
Example 4: how to clear array in javascript
A.length = 0
Example 5: remove all array elements c#
Array.Clear(myArray, 0, myArray.Length);