What is JavaScript?

JavaScript is a hybrid language. It has some features from each of these three programming styles:

The overlap between these three can be messy :-(

procedural style

functional style

object-oriented style

Three Styles, Summarized

Style Behavior Local State Shared State
procedural functions variables globals
functional functions variables nested scope
object-oriented methods,
variables properties,
static methods,
class definitions

Note that:

The Honey Badger Don't Care

All of these styles exist to make code more readable / maintainable / debuggable for humans...


...to the CPU, it's all just ones and zeros.

 Previous Lesson Next Lesson