5
How to make him search the property ABC
instead of A
? Taking this code into account:
A = 'ABC';
alert(LANG.A);
5
How to make him search the property ABC
instead of A
? Taking this code into account:
A = 'ABC';
alert(LANG.A);
7
The LANG.A
of your example looks for a property called A
in the object LANG
. Already LANG[A]
finds a property whose name is the variable value A
, that is to say, 'ABC'
- is therefore equivalent to LANG.ABC
. I believe you’re looking for this second case.
Wow I completely forgot the clasps, thank you!
Browser other questions tagged javascript property
You are not signed in. Login or sign up in order to post.
As such, explain better. And what is
LANG
?– bfavaretto
@bfavaretto a JSON tree
– Vinícius Lara
alert(LANG[A]);
- That’s what you want?– bfavaretto