DEV Community

Mehul Lakhanpal
Mehul Lakhanpal

Posted on • Originally published at codedrops.tech

Delete property from an object

const obj = {
  username: "codedrops.tech",
  email: "codedrops.tech@gmail.com",
  password: "123456",
};

delete obj.password;

console.log(obj); // { username: 'codedrops.tech', email: 'codedrops.tech@gmail.com' }
Enter fullscreen mode Exit fullscreen mode

Thanks for reading 💙

Follow @codedrops.tech for more.

InstagramTwitterFacebook

Micro-Learning ● Web Development ● Javascript ● MERN stack

codedrops.tech


Projects

File Ops - A VS Code extension to easily tag/alias files & quick switch between files

Top comments (0)