DEV Community

Kobinath Ramalingam
Kobinath Ramalingam

Posted on

Javascript rest operator

let person = {
firstname : "Raja",
age : "56",
contact : 983736333
}

console.log(person.firstname)
console.log(person.age)

let a = [1,3,4,5]

console.log(a[3])

//rest operator

let {age,contact, ...rest } = person

console.log(age,contact,rest)

Top comments (0)