Below is an example of my code
/// Control vars ///
/// Control var ID ///
var id=2;
///
/// Load Fields by ID ///
var name_s_+id=jQuery("#name_c_"+id).val();
///
alert("name_s_"+id);
I have an ID which can be, for example, any value in (1,4,5,3,2 ....... etc)
I would like to create references using the naming scheme var name_s_(Load ID)
How does JavaScript support such dynamic variable names, and how can I reference the value in my code to, for example, alert it's value:
alert("name_s_"+id);