3 ms·
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:
by galaxyLogic 2y 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].