A brief introduction to the basics of the JavaScript programming language.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


A very brief introduction to JavaScript in preparation to creative coding using p5.js

The purpose of this project is to provide a very brief introduction to the JavaScript programming language. Through a series of stages, fundamental concepts of JavaScript are illustrated and described.

The project was created as part of an overall introduction to creative coding using p5.js, which is based on JavaScript.

Project walkthrough

Following a summarized project walkthrough is given, illustrating the single stages of this introduction to JavaScript. Each step of the walkthrough describes the content of the corresponding JavaScript script.

01 - JavaScript function base frame

Illustrating the base frame of a function in JavaScript. The function features a simple print out of some text to the console. Furthermore the syntax of a function in JavaScript is described.

02 - Statements

Describing different statements in JavaScript, such as declaration statement, assignment statement, output statement and return statement. Furthermore the terminology of initialization and left-hand side (LHS) as well as right-hand side (RHS) are introduced.

03 - Arithmetic operators

Five different arithmetic operators, concretely +, -, * , / and % (modulo) are introduced.

04 - More functions and local vs global variables/scope

Functions to add and multiply two variables are created and called. Furthermore, the difference between local and global variables and their accessibility is illustrated.

05 - Arrays and objects

During this step, the concept and manipulation of arrays and objects are illustrated.

06 - Loops and iteration

Functionalities in order to iterate and thus execute source code over and over again are illustrated in form of the for-loop, the while-loop, and the do-while-loop. Additionally, an example for the iteration over an array collection is demonstrated.

07 - Branching source code using conditional statements

Using the if-else statement, the switch-statement as well as the conditional operator, different possibilities to branch source code are illustrated, helping the user to react on dynamic conditions directly.

08 - Relational and logical operators

During this step, common relational (==, !=, >, <, >=, <=) and logical (&&, ||, !) operators in JavaScript are introduced in order to use the full potential of the prior described approaches to create branches in the source code.


MIT License, see LICENSE.md