-
Notifications
You must be signed in to change notification settings - Fork 0
Constructor
Ben Christel edited this page Dec 22, 2020
·
1 revision
A constructor is a Nilpotent, non-ReferentiallyTransparent Routine that returns an Object.
Example:
function Counter() {
let count = 0
return {increment, decrement, value}
function increment() {
count++
}
function decrement() {
count--
}
function value() {
return count
}
}