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 = Object.create(null); | |
| person.age = 21; | |
| if (Object.hasOwn(person, 'age')) { | |
| console.log(person.age); // true - works regardless of how the object was created | |
| } | |
| if (person.hasOwnProperty('age')){ // throws error - person.hasOwnProperty is not a function | |
| console.log('hasOwnProperty: ', person.age); | |
| } | 
  
    
      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 fruits = ['apples', 'oranges', 'pears']; | |
| console.log(fruits[fruits.length - 1]); // pears | |
| console.log(fruits.at(0)); // apples | |
| console.log(fruits.at(-1)); // pears | 
  
    
      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
    
  
  
    
  | class User { | |
| username; | |
| #address; | |
| set #address(addr) { | |
| #address = addr; | |
| } | |
| get #address() { | |
| return #address; | 
  
    
      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
    
  
  
    
  | class User { | |
| username; | |
| static userId; | |
| static get userId() { | |
| return userID; | |
| } | |
| } | 
  
    
      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
    
  
  
    
  | class User { | |
| username; | |
| dateOfBirth; | |
| #address; | |
| get #address() { | |
| return #address; | |
| } | |
| } | 
  
    
      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
    
  
  
    
  | class User { | |
| username; | |
| dateOfBirth; | |
| #address; | |
| } | 
  
    
      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
    
  
  
    
  | import { getUser } from './api/User'; | |
| const user = await getUser(); | 
  
    
      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 res = await fetch('<https://swapi.dev/api/people/1/>'); | |
| const person = res.text(); | 
  
    
      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
    
  
  
    
  | nav { | |
| /*column-count: 4; | |
| column-width: 150px;*/ | |
| columns: 4 120px; /* same as above */ | |
| column-gap: 2rem; | |
| column-rule: 1px dashed #ccc; | |
| } | 
  
    
      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
    
  
  
    
  | <section> | |
| <h2>Europe</h2> | |
| <nav> | |
| <ul> | |
| <li><a href="#">Belgium</a></li> | |
| <li><a href="#">Netherlands</a></li> | |
| <li><a href="#">Denmark</a></li> | |
| <li><a href="#">Germany</a></li> | |
| <li><a href="#">Czechia</a></li> | |
| <li><a href="#">France</a></li> |