---
title: "Comment by Sid on \"JavaScript Rest Parameters and Spread Syntax\" | Hashnode"
description: "Ohh. In the last example I thought mydetails will be a nested object of mydatabase object."
url: "https://hashnode.com/posts/javascript-rest-parameters-and-spread-syntax/605b1d9e78c4742436d4f336/comment/607f9822eb2bd30d2d22c37b"
---

[Discussion](https://hashnode.com/posts/javascript-rest-parameters-and-spread-syntax/605b1d9e78c4742436d4f336)

Comment [JavaScript Rest Parameters and Spread Syntax](https://hashnode.com/posts/javascript-rest-parameters-and-spread-syntax/605b1d9e78c4742436d4f336)

[Sid](https://hashnode.com/@siddiq)

[Apr 21, 2021](https://hashnode.com/posts/javascript-rest-parameters-and-spread-syntax/605b1d9e78c4742436d4f336/comment/607f9822eb2bd30d2d22c37b)

Ohh. In the last example I thought mydetails will be a nested object of mydatabase object.

[Bello](https://hashnode.com/@techstack)

[Apr 21, 2021](https://hashnode.com/posts/javascript-rest-parameters-and-spread-syntax/605b1d9e78c4742436d4f336/comment/607f9822eb2bd30d2d22c37b#reply-607fa33deb2bd30d2d22c457)

No spread operator only extracts the properties (key-value pairs) of an object.

[Sid](https://hashnode.com/@siddiq)

[Apr 21, 2021](https://hashnode.com/posts/javascript-rest-parameters-and-spread-syntax/605b1d9e78c4742436d4f336/comment/607f9822eb2bd30d2d22c37b#reply-607fa46dc99e200d08f8187c)

[Bello](https://hashnode.com/@techstack) can we use rest to nest the object as i said?
