Let's Talk About Data Types Be A Better Coder
Data types
let’s talk about data.
Most data is really boils down to just a few types. There are strings, integers, and floats for the most part. Strings are, well, a string of characters or letters naturally. Integers are whole numbers. Floats are decimal numbers.
Some examples of strings.
-
”” an empty string
-
”a” a simple string
-
“hello world” my favorite string
-
“\n\t\e\d” a string of special characters. newline, tab, escape, backspace
Some examples of integers
-
2 a positive whole number
-
0 zero
-
-5 a negative number
Some examples of Floats
-
- 123 some decimal
-
- 1415927 some of pi
-
-1.0 a negative number that is equal to the integer -1
Complex Data Types
Sometimes there is a certain type of data we use over and over again. Usually when this happens we make some standard for it. Some examples like this are Timestamps, Regexp, Arrays, Hashes
blog comments powered by Disqus
Published
21 May 2012