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 someObj = {}; | |
| someObj.someProp = "I am here"; | |
| console.log(someObj.hasOwnProperty("someProp")); // true | |
| let withoutPrototype = Object.create(null); | |
| withoutPrototype.someProp = "I am here too" | |
| console.log(Object.hasOwn(withoutPrototype, "someProp" )) //true | |
| console.log(withoutPrototype.hasOwnProperty("someProp")) | |
| //error withoutPrototype.hasOwnProperty is not a function | 
  
    
      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
    
  
  
    
  | function doWork() { | |
| try { | |
| doSomeWork(); | |
| } catch (err) { | |
| throw new Error('Some work failed', { cause: err }); | |
| } | |
| try { | |
| doMoreWork(); | |
| } catch (err) { | |
| throw new Error('More work failed', { cause: err }); | 
  
    
      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 nums = [0, 1, 2, 3, 4, 5]; | |
| const lastElement = nums.at(-1); | |
| const secondLastElement = nums.at(-2); | |
| console.log(lastElement); // prints 5 | |
| console.log(secondLastElement); // prints 4 | 
  
    
      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 Counter { | |
| #x = 0; | |
| #increment() { | |
| this.#x++; | |
| } | |
| #print() { | |
| return this.#x; | |
| } | 
  
    
      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 Counter { | |
| #x = 0; // private class field | |
| increment() { | |
| this.#x++; | |
| } | |
| print() { | |
| return this.#x; | |
| } | 
  
    
      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 Counter { | |
| x = 0; // public class field | |
| increment() { | |
| this.x++; | |
| } | |
| print() { | |
| return this.x; | |
| } | 
  
    
      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 Ember from 'ember'; | |
| export default Ember.Controller.extend({ | |
| appName: 'Ember Hello World', | |
| Title: `First Ember Page`, | |
| actions:{ | |
| testAction(){ | |
| console.log('Action Click'); | |
| } | |
| } |