I'm making a program that requires different parts in a variable the code goes like this
var num=Math.round(Math.random()*5);
var a;
var a[0]="hi"
/*I've done this before, but remember it as a[num] */
var a[1]...
/*Many vars later*/
console.log(a[num])
this code always says that a[] does not work