var sub=["Maths","Chemistry","Physics"];
for(var i=0;i<sub.length;i++)
{
var sub[i]=[]; // this line has error
}
I want to create and get result as below:
Maths[],Chemistry[],Physics[]
If it is not possible to get in this way is there any alternate in Javascript to achieve the same