2:0 JavaScript Fundamentals

Lets dive into JavaScript a little and use the visual library p5.js to explore it graphically.

What is JavaScript

JavaScript is a language originally written for the browser to do complex things on web pages...


...though now it can do much, much more.

What is JavaScript

What is p5.js

p5.js is a JavaScript library for creative coding with a focus on making coding accessible and inclusive for artists, designers, educators, beginners, and anyone else.

What is p5.js

What is a javascript library?

A JavaScript library is a bunch of useful functions.

In a simple example the library is included in the head of your HTML file and the functions (and capabilities) of that library are available to use in your own code.

<html>
  <head>
    <script src="p5.js"></script>
  </head>
  <body>
    Let use p5.js
  </body>
</html>

What is a javascript function?

A JavaScript function is a bit of code designed to do a particular task.

function doSomething() {
  // do something cool...
}