//codexdesign.org
//learning approach: p5.js (uses the JavaScript language)

//motion design: creating custom variables, boolean type
//code: if
//booleans (true/false) are a type of data 


let morning = true; //this is a global variable, boolean type, named morning, assigned true
//let morning = !true; //try this version next, observe results 

function setup() {
createCanvas (400, 400);
rectMode(CENTER);
noStroke();
}

function draw() {

  if (morning == true) {
    background (100,150,250); //light
  }

  if (morning == false) {
    background (10); //dark
  }

}

//study/practice:
//Conditionals use relational operators in the tests:
//> (greater than)
//>= (greater than or equal to)
//< (less than)
//<= (less than or equal to) 
//== (equals, just value)
//=== (strict equals, both value and data type)
//!= (not equal to) this exclamation mark is called a "bang" and means NOT
