Need more help understanding strings

I understand that strings are a string of characters and locked in memory yet what is their purpose? Why do we use
rather than

The left side of the = is a variable. Variables hold values such as Strings, Numbers, etc…

If you want to assign the value “word” to a variable named word, then you must write:

word = "word"
1 Like

The computer needs extra help to understand what we are saying.
So does “word=word” mean that you want to assign the value of the variable word to word?
Or do you want to assign 4 characters comprised of w o r d to word?
It doesn’t understand so it needs the double quotes to know that you want a ‘literal string’ comprised of the letters w o r d to be assigned to a variable (which is essentially a space in memory) that you have called word.

hope this helps.


A string is basically any type of text. A variable will not consider word = word because by default variables store numbers. You have to indicate the data type that you’d like, in this case a string(text) so that the compiler does not confuse or display an error.