Please enable JavaScript.
Coggle requires JavaScript to display documents.
JS - get started - Coggle Diagram
JS - get started
Name
JavaScript, JS, ECMAScript, ES2019
An artifact of marketing shenanigans - to attract Java devs xD and word "script" was popular and refer to lightweight programs
-
-
Paradigm
multi-paradigm language
that means you can write procedural, OO or functional
-
-
-
-
declarative
what should be done
using: map, filter, reduce...
standalone progrm format
each standalone file is its own separate program. Execution of the application allows these individual programs to cooperate and act as one program
They mix together in this global scope namespace, so at runtime they act as a whole.
module format
Modules are also file-based. If a file is loaded via module-loading mechanism such as an import statement or a <script type=module> tag, all its code is treated as a single module
JS does in fact still treat each module separately. Similar to how "global scope" allows standalone files to mix together at runtime, importing a module into another allows runtime interoperation between them.
Values
Primitive
-
-
-
-
-
symbol
special-purpose value that behaves as a hidden unguessable value. Symbols are almost exclusively used as special keys on objects
-
-
-
Functions
-
-
functions are values that can be assigned and passed around. In fact, JS functions are a special type of the object value type
-
-
-
-
-
Iterables
-
-
maps
A Map data structure uses objects as keys, associating a value (of any type) with that object. Maps have a different default iteration than seen here, in that the iteration is not just over the map's values but instead its entries. An entry is a tuple (2-element array) including both a key and a value
-
-
-
-
-
-
Closure
When a function makes reference to variables from an outer scope, and that function is passed around as a value and executed in other scopes, it maintains access to its original scope variables
Prototypes
ability for two objects to simply connect with each other and cooperate dynamically (during function/method execution) through sharing a this context.
-