Firstly, it’s functional with closures… From there prototypal - so you can express whatever you want… the key is being functional. This was a key to the advent of JSON, but is also one of the most elegant and powerful bits of JS
You're wrong. The prototypical model of JS was inspired by the Self programming language[0], itself a descendant of Smalltalk. It is a very crude implementation for sure, but it is object programming nevertheless. Closures being present sours the purity a bit, but closures are poor man's objects[1] anyway.
Also, Smalltalk was heavily inspired by LISP[0]. The line between functional and object-oriented is quite blurry. Especially in a pure OO language like Smalltalk. The dynamic and prototypical model of JS is definitely another example of the subtle harmony of functional and OO.
trashburger|1 year ago
[0]: https://selflanguage.org/
[1]: https://stackoverflow.com/a/11421598
thesecretsquad|1 year ago
[0]: https://worrydream.com/EarlyHistoryOfSmalltalk/