I am coding in node.js atm. I need to create a dynamic variable and invoke it.
e.g.:
username = 'im_a_user';
global['ws[' + username + ']'] = ws; //(yes, i want to store the connection with ws module)
but
ws[im_a_user].send('blabla');
doesn't work and node shuts down. So I want to know how global['ws[' + username + ']']
looks like for debbuging.
Do you know how I can print it - or even better, why im_a_user
in ws[im_a_user].send('blabla');
isn't defined?
Thanks for your time!