DEV Community

Discussion on: Three dots "..." in JS - Spread and Rest explained

Collapse
 
roniemeque profile image
Ronie

Cool! Another great example for rest usage is when you want to create a new object based on a existing one while excluding specific properties:
const {password, ...userWithoutPassword} = user;