Invalid Array Length Javascript Code For Calculator