Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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");   
}
Source by www.codegrepper.com #
 
PREVIOUS NEXT
Tagged: #array #javascript
ADD COMMENT
Topic
Name
9+6 =