Skip to content

Instantly share code, notes, and snippets.

@chadrick-d-dev
Last active April 2, 2020 02:40
Show Gist options
  • Save chadrick-d-dev/c97538fc0fdbb56717dd7ae6aebdfd55 to your computer and use it in GitHub Desktop.
Save chadrick-d-dev/c97538fc0fdbb56717dd7ae6aebdfd55 to your computer and use it in GitHub Desktop.

String Data Type

Description: String data is usually made of textual sequences surrounded by single or double quotes.

Examples:

  1. var string1 = "apple"
  2. var string2 = "tabby"
  3. var string3 = "car"

Integer Data Type

Description: Integer data consists of whole numbers without decimal values.

Examples:

  • var int1 = 10
  • var int2 = 25
  • var int3 = 13

Float Data Type

Description: Float data consists of numbers with decimal values

Examples:

  1. var float1 = 9.5
  2. var float2 = 6.5

Array Data Type

Description: An array consists of multiple string, integer, or float values.

Examples:

var array1 = ["worm", "ant", "catterpillar", "centipede"]
var array1 = [1, 2, 3, 4, 5]

Boolean Data Type

Description: Boolean data can only hold two values, such as true/false, or yes/no.

Examples:

var is_happy = false
var is_sad = true

alt text

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