-
Module design
- ini package
-
data structures
-
primitive values: num, booleans, strings
- immutable and cannot be changed
- copied "as a whole value"
-
arrays and objects are used to group values into a single value
-
arrays - sequence of values
-
objects - dict
- reference - binding
- mutable
-
object is stored and copied "by reference"
-
most objects also have a prototype
- a prototype is another object that is used as a fallback source of properties
- Object.prototype
-
-
-
JS functions are regular values representing an "action"
- higher-order functions allow us to abstract over actions, not just values
- pass function values to other functions
- higher-order functions allow us to abstract over actions, not just values
-
OOP
-
divide programs into smaller pieces and make each piece responsible for managing its own state
-
different pieces interact with each other through interfaces
- pieces are modeled using objects
- their interface consists of a specific set of methods and properities
-
encapsulation
- separate interface from implementation
-
-
class
- in JS, a class is a kind of function
- a class is an extensible program-code-template for creating objects, providing init values for state (variables) and implementations of behavior (functions)
js
Directory actions
More options
Directory actions
More options
js
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||