DEV Community

PUSHAN VERMA
PUSHAN VERMA

Posted on

1 1

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

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay