Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

is it possible to declare two conditions in for loop in javascrip

var guests = ["john", "bob", "marie"];    
var arrayLength = guests.length;    
    
for(var i=0;i<arrayLength && i<5;i++){    
 console.log(guests[i] + ", ");    
}    
//outputs "john, bob, marie"    
Source by instructobit.com #
 
PREVIOUS NEXT
Tagged: #declare #conditions #loop #javascrip
ADD COMMENT
Topic
Name
9+9 =