var myArray = [12, 23.5, "hello", true];
I have some Java background and this is not possible in Java as you would have to declare the data type otherwise you would get an error (
int myArray = blah blah blah)
So my question is, in what situations would you use this instead of an object for example. Examples would be great. Thanks.