DEV Community

PUSHAN VERMA
PUSHAN VERMA

Posted on

Introduction to syntax of Arrays and Objects

*Arrays declaration and Intialization *

let arr =[1,2,3,4,"pushan","chandresh","aditi","chetna"];

console.log(arr);

ans ->Image description

Objects declaration and Initialization

let myObj1={
name2:"Verma",
arr:["aditi","chetna","chandresh","pushan"],
exercise:true,
galatkaam:null
}
let myObj ={
name1:"pushan",
arr:[1,2,3,4,5],
sach:true,
myObj1
}

console.log(myObj);

ans ->Image description

Discussion (0)