Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript objects

const someObj = {
  propName: "John"
};

function propPrefix(str) {
  const s = "prop";
  return s + str;
}

const someProp = propPrefix("Name");
console.log(someObj[someProp]);
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #javascript #objects
ADD COMMENT
Topic
Name
3+9 =