Home / Javascript Tips Generated By ChatGPT / Clearing an Array in Javascript Quickly clear all elements from an array. Source Code let numbers = [1, 2, 3]; numbers.length = 0; console.log(numbers); // []