Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

JavaScript Array length

//The length property provides an easy way to append a new element to an array:
const fruits = ["Banana", "Orange", "Apple", "Mango"];
fruits[fruits.length] = "Kiwi"
// >>  ["Banana", "Orange", "Apple", "Mango" , "Kiwi"]


//if you find this answer is useful ,
//upvote ⇑⇑ , so  the others can benefit also . @mohammad alshraideh ( ͡~ ͜ʖ ͡°)
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #JavaScript #Array #length
ADD COMMENT
Topic
Name
8+4 =