in javascript functions are data.While javascript doesnt allow lazy evaluation,it's good enough to teach most of SICP concepts.
For someone that knows basic javascript,it's good enough.
I dont agree with you saying it is not idiomatic javascript. There is nothing such as idiomatic javascript ,that's why people keep arguing on how to write javascript,javascript doesnt care. If javascript did care,it would be a different language.
Anyway my point is ,what matters are the concepts , not the language. Most SICP concepts can be taught in many different languages.It's not about LISP, or javascript. It could be Haskell,CAML,or even Python it doesnt matter.
But if that is the case, wouldn't SICP be less language agnostic since (most of) the concepts taught cannot be universally applied to non-homoiconic languages?
The fact that Scheme uses Lisp is what makes SICP work at all. The course would be difficult or impossible to complete using most other languages. The keyword is: homoiconicity, the "code=data" property of Lisp.
Most of the course focuses on writing interpreters and compilers for Lisp and making variations on it (lazy evaluation, non-deterministic). This would be very painful if a non-homoiconic language is used.
And indeed, the "JavaScript version" you posted is very painful to read. It's difficult to understand how the data structures used by the interpreter are related to JavaScript code. And the code most definitely is not idiomatic JavaScript. I would not consider this an improvement over the original Scheme version.