check if var is array js
snippet in javascript

check if var is array js

user8427

Array.isArray(variableName)

javascript is variable in array

user6191


var fruits = ["Banana", "Orange", "Apple", "Mango"];

var n = fruits.includes("Mango");