I've been using both for a while now -- JS for 15 years, Python for five. I expected some big revelation given the consensus that Python is clearly better.
I like working in Python, but I'm still waiting for that revelation. As I can tell, if you can't be as productive in JavaScript as you are in Python, you're either not actually productive in Python, or you never bothered to learn JavaScript.
(I appreciate people who are nevertheless insistent about Python's superiority without bothering to provide any kind of supporting argument, though -- it lets me know how safe I am in disregarding an opinion where I used to think I was probably missing something -- so if you want to recapitulate the quality argument I'm responding too, feel free.)
Python has a string library that makes some kind of goddamn sense (because it matches the C implementation). When I realized that in JS, foo.replace('bar','fizz'); only replaces one instance of 'bar', my head exploded. Then there is the lack of real integers, and all the bullshit ToStringing() that can happen at runtime if you aren't hyper-vigilant.
I like working in Python, but I'm still waiting for that revelation. As I can tell, if you can't be as productive in JavaScript as you are in Python, you're either not actually productive in Python, or you never bothered to learn JavaScript.
(I appreciate people who are nevertheless insistent about Python's superiority without bothering to provide any kind of supporting argument, though -- it lets me know how safe I am in disregarding an opinion where I used to think I was probably missing something -- so if you want to recapitulate the quality argument I'm responding too, feel free.)