3 ms·
[Ask YC] - Javascript for python developers
All JS books I can find are either too basic. (Start with what loops are, ) or too esoteric.
Is there a book which teaches Javascript for experienced developers, and is preferable geared towards people who know Python already?
Ps. How can I get a set type behaviour in JS. This is the python code I want to do in JS ( http://dpaste.com/94047/ ), and cant find one simple way
- inimino 18y agoJavaScript has arrays and objects, either of which could be used to do what you want, though you'll need to write your own library of set operations. JavaScript and Python are very different languages. I'd suggest you start here: https://developer.mozilla.org/en/JavaScript https://developer.mozilla.org/en/JavaScript
- amthanks 18y agoProfessional JavaScript for Web Developers, Pro Javascript Techniques, Ecma 262 Spec , O'Reilly Definitive 5th Edition, Javascript: The Good Parts are books I'd recommend for learning JS, and most of the authors have experience with various languages ( though none of them are really geared toward a Pythonista ). You could create your own custom function that emulates Python's set, but you can't do advanced expressions such as using the binary minus with 2 operands ( sets ) on either side. You'd have to do something like set.diff( firstArray, secondArray ).