You already known the concept of values in Basic Terms, now we are going to learn more about it and learn how to write it in a way that machine can understand.

Value Types

You cannot mention value without mentioning value types. Value types describes what category the value is.

Here are some common types:

How to Write a Value

Difference between 5 and "5"

This is a question that a lot of students are confused about. 5 is a number, it can add with other numbers for example 5 + 1 will give you 6. "5" is a string, which is a text. You can’t add it to numbers, but you can add it to other strings, for example "5" + "test" will give you "5test", "5" + "1" will give you "51".

Next: Operators