Skip to content

Instantly share code, notes, and snippets.

@stacyp2006
Last active May 28, 2020 23:11
Show Gist options
  • Save stacyp2006/85adcf74ab3a8089676e7cb680944872 to your computer and use it in GitHub Desktop.
Save stacyp2006/85adcf74ab3a8089676e7cb680944872 to your computer and use it in GitHub Desktop.
Beginner's Guide to Data Types

Beginner's Guide to Data Types

Data Types and Syntax

Data types are the ways to represent the kind of data that you can use in a programming language. Syntax is how we differentiate between data types.

Data Types

  • String: used to represent text; use quotes to contain the string

    1. Alphabetic Characters
    2. Spaces
    3. Numbers
    4. Special Characters
  • Integer: whole numbers that can be positive, negative, or zero

  • Float: numbers containing decimals

  • Boolean: a value that is either true or false

  • Array: a data structure that represents a group of things

    • usually within brackets

    • use strings within quotes inside brackets

    Data types are defined using the term variable or var. For example:

    var iceCream = "Chocolate"

    alt text

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment