Created
          June 29, 2022 02:06 
        
      - 
      
 - 
        
Save szaranger/708b0e2e3fb728d81a181cba4d61df4c to your computer and use it in GitHub Desktop.  
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | const person = { | |
| hasOwnProperty: function() { | |
| return false; | |
| }, | |
| age: 21 | |
| }; | |
| if (Object.hasOwn(person, 'age')) { | |
| console.log(person.age); // true - the remplementation of hasOwnProperty() did not affect the Object | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment