Answers for "javascript array method check if arary"

13

javascript check if is array

var colors=["red","green","blue"];

if(Array.isArray(colors)){
    //colors is an array
}
Posted by: Guest on July-22-2019
0

if array javascript

// I know javascript can be hard but see this example and you will learn

// Javascript if condition and array example
var people = ["filex", "alex", "jon"];
var peopleNeeded = people[1]; // 1 is the index bc the index starts from 0
 
if (peopleNeeded <= people[1]) {
 console.log("alex needed");   
} else {
 console.log("lol");   
}
Posted by: Guest on July-16-2021

Code answers related to "javascript array method check if arary"

Code answers related to "Javascript"

Browse Popular Code Answers by Language