Function Updated 17 Oct 2026
Array.isArray(value)
Determines whether the value is an array. Text, objects and Set are not arrays.
Parameters
valueanyrequiredThe value to test.
Returns
true if the value is an array, otherwise false.
Example
Mixed HTML (or any text file) with inline JavaScript between hash signs.
#{
// Test different values
let arr = [1, 2, 3];
let str = "Hello";
let obj = {key: "value"};
// Check if they are arrays
write(Array.isArray(arr)); // true
write(Array.isArray(str)); // false
write(Array.isArray(obj)); // false
}#The template above produces this output:
truefalsefalse