Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

use obj property inside itself

const obj = {
  key1: "it ",
  key2: () => this.key1 + " works!";
}

alert(obj.key2())
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #obj #property
ADD COMMENT
Topic
Name
1+5 =