JavaScript’s arrays can hold heterogeneous types, change size on the fly, and readily insert or remove elements. Traditional methods like slice, splice, and push/pop do this by operating on the array ...
While certainly possible, this is not a practical method of recording such data. Suppose the program needed to record 100 scores? 100 variables would be required!