Javascript Object | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
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 Resposta
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