Hello Reader's, Suppose you having a variable and you want to find it by it's name, See the example below:-
var MyVar = '12';
alert(window['MyVar']);
Output:-
12
No if you have variable like this way
var MyVar = {IND:'value12'};
alert(MyVar['IND']);
Output:-
value12
So now like these way you can find the variable by their name
0 Comment(s)