Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

user key value within the obj js

var foo = {
  a: 5,
  b: 6,
  get c() {
    return this.a + this.b;
  }
}

console.log(foo.c) // 11
 Run code snippet
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #user #key #obj #js
ADD COMMENT
Topic
Name
4+5 =