QP School
QP School
>
Tutorials
>
JavaScript Tutorials
> Check if a variable is an array in JavaScript
Full Version:
Check if a variable is an array in JavaScript
You're currently viewing a stripped down version of our content.
View the full version
with proper formatting.
Qomplainerz
04-04-2023, 07:12 AM
// Check if a variable is an array
let colors = ['red', 'green', 'blue'];
let isArray = Array.isArray(colors);
document.write(isArray);
QP School
>
Tutorials
>
JavaScript Tutorials
> Check if a variable is an array in JavaScript