I'm not deep in either CS or JS, but I suppose one could find some pitfalls from the differences between == and ===, and from checking the existence of a variable?
Also, JS switch/case statements follow the good-old maldesign from C where each body has to end with break or it falls through.