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 stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #objects
ADD COMMENT
Topic
Name
7+2 =