Home / Javascript Tips Generated By ChatGPT / Checking if Variable is an Array in Javascript Determine if a variable is an array. Source Code let fruits = ["apple", "banana", "cherry"]; console.log(Array.isArray(fruits)); // true