1
I have the following code:
var teste = 'objeto': {
version: '5.x.x',
name:this[??] // 'objeto'
};
What could be done for that property name
has the same name of the object to which it belongs (which in this case is objeto
)?
The syntax you have is wrong, you can’t name objects that way. You can explain better what you want to do?
– Sergio
Are you sure it’s not
{'objeto':{...}}
instead of'objeto':{...}
?– hugomg
That’s right, I didn’t care much for the syntax because the focus is the concept, but actually properties in string format are only accepted when inside an object
– anisanwesley