var key = "test"; var theThing = {}; theThing[key] = function() { return "hello"; };; console.log(theThing.test());
To clarify, if I had a string in my source code that had nothing to do with looking up attributes, it wouldn't be touched?
var one = "_I_just_like_talking_like_this_"; var two = "_two"; var test = {}; test[two] = "II"; console.log(test._two);
var one = "_I_just_like_talking_like_this_"; var two = "two"; var test = {}; test[two] = "II"; console.log(test.two); ?
var one = "_I_just_like_talking_like_this_"; var two = "_two"; var test = {_two: "II"};
If you removed the string stanza in the post, only the _two attribute in test would match.
To clarify, if I had a string in my source code that had nothing to do with looking up attributes, it wouldn't be touched?
The result would be