Skip to content

Instantly share code, notes, and snippets.

@mattdeann
Last active August 19, 2020 00:01
Show Gist options
  • Save mattdeann/1a8420d05846e0f67021837b361e1e73 to your computer and use it in GitHub Desktop.
Save mattdeann/1a8420d05846e0f67021837b361e1e73 to your computer and use it in GitHub Desktop.
simple layout stuff

Data Types

use var to declare variables

String

Used to define a set value, inside single or double quotations (can be letters/words)

Examples

  1. a word
  • 'pizza'
  1. a phrase
  • 'good morning'

Integer

Used for whole numbers

Examples

  1. a positive number
  • 568
  1. a negative number
  • -291
  1. zero

Float

Used for numbers with decimals

Example

  • 291.8483
  • 9.99

Boolean

True or False

Examples

Either true or false

imHip = true

iWearSunglasses = true

theseCorrelate = false

Array

A collection of things Denoted by brackets Example (full code block)

var cities = ['Atlanta', 'Detroit', 'Denver'];

var vehicles = ['Car', 'Bus', 'Train'];

Thank you for your patronage

alt text

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