The simple answer is that “array” in your example is a string and “23” is a number. They are different data types, used by the computer in different ways, and the quotation marks are a way of signalling that.
The main thing is that 23 can be used to add, subtract, divide, etc., whereas “array” is just a word.
If you add two strings “23” + “23”, the answer is “2323”. Because in this case the “add” is actually a special operation called “concatenation.”
if you add two numbers, 23 + 23, the answer is 46, because in this case, the “+” is calling for the math operation we all know and love.
Or if you see something like myName, that’s probably a variable that was declared earlier, like var myName = “Mike.” In that case, it’s a variable representing a string (kind of a nickname). It could also be a number. var myAge = 20 would mean that whereever you wrote myAge, it would act the same as 20 (by the way, myAge = 20 is a lie).
If you are interested, there is a way to “force” a string to be a number. If you had a string, “23,” and wrote parseInt(“23”), it will push out 23, the number, which can then be added and subtracted and used in other math-y ways.
TL;DR, the quotes around array signal that it is a “string.” The lack of quotes around 23 signal it’s a “number.”