Hacker News new | ask | show | jobs
by galaxyLogic 439 days ago
JavaScript is not Lisp but it is more like Lisp than like C, even though syntactically it much resembles C.

ES6 JS has nice syntax for calculating with lists:

   let [car, ...cdr] = [1,2,3]
After the above 'car' has value 1 and 'cdr' has value [2,3].
2 comments

in that case Python is also a Lisp because it has:

    car, *cdr = [1, 2, 3, 4]
hmm Rust as well:

    let [car, cdr @ ..] = [1,2,3];