It's hard to divide up these disciplines. I don't think a JS programmer would like to be called a 'designer'. That's why I prefer to have three categories:
Designer: visual/layout design etc.
Front-end developer: HTML, CSS & JS etc.
Back-end developer: programmer using server-side technologies like PHP, .NET etc.
What a 'web designer' is in this context is debatable, but it's up to the individual to decide. It most commonly refers to a designer who perhaps does a bit of coding like HTML and CSS.