Javascript Object | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Javascript Object

How to add multiple object without using array object. (Suppose I wanna add some 10 employee details in array is it possible)

29th Nov 2020, 9:49 AM
Life Snatcher
Life Snatcher - avatar
1 Answer
0
You can create arrays by using the square brackets [] . e.g. arr=[‘one’,’two’,’three’] then use the push method to add more items: arr.push(‘four’) just substitute the strings in the array with an object {}
29th Nov 2020, 1:19 PM
Logomonic Learning
Logomonic Learning - avatar