Skip to content

Instantly share code, notes, and snippets.

@st0nebreaker
Last active February 21, 2020 00:36
Show Gist options
  • Save st0nebreaker/b2a9e4340f0becfe564366e60827d99b to your computer and use it in GitHub Desktop.
Save st0nebreaker/b2a9e4340f0becfe564366e60827d99b to your computer and use it in GitHub Desktop.
Beginner's Guide to data types

Welcome!!

So you want to learn code?

Here's some basic data types you need to know..

  1. String : A string is used for represented text, everything in the desired text is wrapped around in double or single quotes. (' ' or " ")

    var myString = "Hello world!";

  2. Integer & Float :

    • An integer represents numbers without decimals. var ageOfDog = 2;

    • A float represents numbers with decimals. var priceOfDog = 2000.50;

  3. Boolean : These are used for true or false statements. The value is either true or false.

    var x = false;

  4. Array : An array is a group of instances, this could be strings, integers, floats, or booleans.

    var groceryList = ["apples", "eggs", "chocolate", "bananas", "cereal"];

alt text

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