9 Matching Annotations
  1. Jun 2021
  2. Mar 2021
  3. Oct 2020
    1. for (var member in myObject) delete myObject[member]; ...would seem to be pretty effective in cleaning the object in one line of code

      But checking hasOwnProperty is probably better/safer idea:

      for (var prop in obj) { if (obj.hasOwnProperty(prop)) { delete obj[prop]; } }
      
  4. Sep 2020
  5. Sep 2019
    1. Using reduce and Object.keys As (1), in combination with Object.assign Using map and spread syntax instead of reduce Using Object.entries and Object.fromEntries
  6. Jul 2018