js delete operator

example.js
1
2
3
4
5
6
7
8
9
const user = {
username: 'sung',
password: '1234',
};

delete user.password;

console.log(user);
// { username: 'sung' }
  • 객체의 속성을 제거한다

참고

Author

chinsung

Posted on

2021-08-26

Updated on

2021-08-28

Licensed under

댓글