[Vuejs]-Is delete a function or reserved keyword in Vue?

5👍

Yes delete is a reserved keyword which is used to delete object field :

let user = {
  name: 'John',
  age: 27
}

console.log('before delete age field ', user)
delete user.age
console.log('after delete age field ', user)

3👍

I think delete is a keyword in JavaScript.
You should check this link: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete?retiredLocale=vi

Leave a comment