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