Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

array.push

var vegetables = ['Capsicum',' Carrot','Cucumber','Onion'];
vegetables.push('Okra');
//expected output ['Capsicum',' Carrot','Cucumber','Onion','Okra']; 
// .push adds a thing at the last of an array
Source by .www.developer.mozilla.com #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
1+8 =