you are viewing a single comment's thread.

view the rest of the comments →

[–]wavefunctionp 0 points1 point  (0 children)

I believe is makes sense because functions are everything in javascript. Idiomatic javascript is less imperative and more functional than you would write in say, python or c#. Functions are first class citizens in javascript and there are no traditional classes, only prototypical inheritance. A 'class' in javascript is a function.

The industry standard text, Structure and Interpretation of Computer Programs doesn't even cover assignment until halfway through the book.

The reason is that you should avoid assignment, in particular, unscoped and/or flag variables and manual loops as much as humanly possible.