Hacker News new | past | comments | ask | show | jobs | submit login
[Ask YC] - Javascript for python developers
1 point by shabda on Nov 27, 2008 | hide | past | favorite | 2 comments
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




Professional 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 ).


JavaScript 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




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: