You keep saying that, but JavaScript is not a declarative language. It’s a procedural language. It executes code sequentially, statement by statement. It has variable assignment; it can mutate state. It has conditionals and loops. These qualities are present in all procedural languages, including C and Pascal.

The only thing that gives JavaScript a declarative flavour is lambdas. But lambdas are also present in Smalltalk, which is a pure object-oriented language. Smalltalk is not a declarative language.

The same can be said of Ruby and PHP and Perl and C# and C++.

There is nothing declarative about JavaScript syntax. You can make the syntax look declarative, but you can do the exact same thing in Smalltalk, as well.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store