programming paradigm
A programming paradigm is a fundamental style of computer programming, a way of building the structure and elements of computer programs. Capablities and styles of various programming languages are defined by their supported programming paradigms; some programming languages are designed to follow only one paradigm, while others support multiple paradigms.
In JavaScript we can find multiple paradigms.
Imperative Programming
That type of programming is based on describing actions.
It is about thinking about algorithm which solves the problem and implementation of it, nothing more.
Prototype-based object-oriented programming
That type of programming is based on prototypical objects.
Functional / Metaprogramming
That type of programming is based on manipulation of execution model.
Examples
1 2 3 4 5 6 7 8 9 |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
1
|
|
More about functional programming