Examples of creative work using Text:

Rune Madsen’s speech comparison visualization

https://runemadsen.com/work/speech-comparison/

Shirley Wu’s An Interactive Visualization of every line of Hamilton

https://pudding.cool/2017/03/hamilton/

Associative Arrays (also called dictionary, map or hash)

  let myAssociativeArray = {"this":12,"is":5,"the":13,"end":2};

  // new syntax for a loop
  for (let key in myAssociativeArray) {
      console.log(`${key}: ${myAssociativeArray[key]}`);
  }

String Object

P5 String Functions

Code from class:

https://editor.p5js.org/des8963/sketches/r0VZkUHjX

Sorting Arrays


function setup() {
  createCanvas(400, 400);
  let myArray=["dog","cat","Elephant","eggplant","goat"];
  myArray.sort();
  print(myArray);
}

// result
// ["Elephant", "cat", "dog", "eggplant", "goat"]