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.
Permalink
Failed to load latest commit information.
01_javascript_function_baseframe.js
02_statements.js
03_arithmetic_operators.js
04_more_functions_local_vs_global.js
05_array_objects.js
06_loops.js
07_conditions_boolean.js
08_relational_logical_operators.js
LICENSE.md
README.md
index.html

README.md

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.

License

MIT License, see LICENSE.md